mirror of https://github.com/rm-dr/daisy
Added ** exponentiation
parent
e5b7aa2d1a
commit
56521cbbcd
|
@ -19,7 +19,6 @@ This is nowhere near complete. Stay tuned.
|
|||
- Arrows to move cursor
|
||||
- Documentation
|
||||
- Branding
|
||||
- ** as exponentiation
|
||||
- Improve tests
|
||||
|
||||
|
||||
|
|
|
@ -309,13 +309,13 @@ mod tests {
|
|||
|
||||
good_expr(64f64, "4^3");
|
||||
good_expr(64f64, "4 ^ 3");
|
||||
//good_expr(64f64, "4**3");
|
||||
//good_expr(64f64, "4 ** 3");
|
||||
good_expr(64f64, "4**3");
|
||||
good_expr(64f64, "4 ** 3");
|
||||
|
||||
good_expr(-81f64, "-3^4");
|
||||
good_expr(-81f64, "-3 ^ 4");
|
||||
//good_expr(-81f64, "-3**4");
|
||||
//good_expr(-81f64, "-3 ** 4");
|
||||
good_expr(-81f64, "-3**4");
|
||||
good_expr(-81f64, "-3 ** 4");
|
||||
good_expr(-81f64, "-(3^4)");
|
||||
|
||||
//good_expr(f64, "3 ^ (-1.4)");
|
||||
|
|
|
@ -242,7 +242,7 @@ impl Operator {
|
|||
"i*" => {Some( Operator::ImplicitMultiply )},
|
||||
"%" => {Some( Operator::Modulo )},
|
||||
"mod" => {Some( Operator::ModuloLong )},
|
||||
"^" => {Some( Operator::Power )},
|
||||
"^"|"**" => {Some( Operator::Power )},
|
||||
"!" => {Some( Operator::Factorial )},
|
||||
_ => None
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue