A pretty TUI scientific calculator. https://daisy.betalupi.com
 
 
 
 
 
 
Go to file
rm-dr 7726eea34d
Updated nix derivation
2023-10-15 11:30:09 -07:00
.github/workflows Action version 2023-04-10 16:04:50 -07:00
buildscript fix electron mass 2023-09-28 14:35:16 -04:00
server Added mobile warning 2023-09-22 10:41:01 -07:00
src Fixed subtract unit check 2023-10-15 11:26:54 -07:00
.editorconfig Edited actions 2023-04-10 14:07:04 -07:00
.gitignore Added nix package 2023-10-14 09:13:54 -07:00
CONTRIBUTING.MD Updated docs 2023-10-15 11:25:19 -07:00
Cargo.lock Version bump 2023-10-15 11:29:19 -07:00
Cargo.toml Version bump 2023-10-15 11:29:19 -07:00
LICENSE Added license 2023-03-27 10:55:20 -07:00
Makefile Updated makefile 2023-09-22 11:22:36 -07:00
PKGBUILD Version bump 2023-08-02 11:51:33 -07:00
README.md Whitespace 2023-10-15 09:30:32 -07:00
TODO.md Updated docs 2023-10-15 11:25:19 -07:00
default.nix Updated nix derivation 2023-10-15 11:30:09 -07:00
shell.nix Updated shell.nix 2023-09-21 20:52:35 -07:00

README.md

A high-precision scientific calculator with support for units, derivatives, and more.

Many features are missing, this is still under development.

Web demo: here (won't work on mobile)

📦 Installation

  • From source: cargo build --release, binary will be at ./target/release/daisy
  • Cargo: cargo install daisycalc
  • Arch: yay -S daisy
  • Debian: coming soon
  • Nix: Use default.nix. Daisy isn't in nixpkgs yet, you'll need to add something like the following to configuration.nix:
let
  daisy = builtins.fetchGit {
    url = "https://github.com/rm-dr/daisy.git";
    ref = "master";
  } + /default.nix;
in
{
  environment.systemPackages = with pkgs; [
    (callPackage daisy { })
  ];
}

📹 Screenshot

Screenshot

🛠️ Features

  • Open-source
  • Extremely high precision
    • Uses a rational datatype when possible, and a high-precision float when not.
  • Pretty printing in prompt (with special substitutions)
  • Supports many physical units, with metric and binary prefixes
  • Supports exponential notation
  • Clear syntax, parsed input is always re-printed as a sanity check.
  • Useful, detailed error messages

📑 Usage

All documentation is built into the prompt. Use the help command to view it.

Evaluate expressions:

  • Basic math: 103 / 2 * 43
  • Functions: sqrt(1.4^3 + 4) * sin(pi / 4)
  • Scientific notation: 1.2e12 * 1e-5

Physical units

  • Unit operations: 2 day + 1 hour
  • Unit conversion: 2 day + 1 hour to minutes
  • Compound units: 10 m/s to mph
  • Conversion errors: 1 liter to volt

Varables

  • Previous answer: ans + 2
  • Variable assignment: a = 143

🌹 Additional Notes

Unit Conversion

The conversion operator to converts its left argument to the unit of its right argument, ignoring its value. For example, 5m to mi and 5m to 10mi are identical.

Celsius and Fahrenheit

Celsius and Fahrenheit are not supported as first-class units because they require an offset when converting from other temperature units. This leads to ambiguity when adding units, since one temperature must be seen as a difference rather than an absolute temperature.

Daisy instead provides four functions (fromCelsius, toCelsius, fromFahrenheit, toFahrenheit) which convert between scalars and Kelvin.

  • "from" functions take a scalar and return a value in Kelvin: fromCelsius(0) = 273.15K
  • "to" functions take a value in Kelvin and return a scalar: toCelsius(273.15 K) = 0

Multiplication Order

Implicit multiplication has a higher priority than division. pi/2 radians will parse as pi/(2 radians). Type (pi/2) radians or pi/2 * radians to get 90 degrees.