File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -465,6 +465,12 @@ impl<'a> AlgebraEnv<'a> {
465
465
self . stack . push ( res) ;
466
466
self . handled += 1 ;
467
467
}
468
+ Ln => {
469
+ let a = self . pop ( ) ?;
470
+ let res = a. log ( E . into ( ) ) . ok_or ( AlgebraError :: TooComplex ) ?;
471
+ self . stack . push ( res) ;
472
+ self . handled += 1 ;
473
+ }
468
474
Sin => {
469
475
let a = self . pop ( ) ?;
470
476
self . stack . push ( Term :: Sin ( a) . into ( ) ) ;
@@ -491,6 +497,12 @@ impl<'a> AlgebraEnv<'a> {
491
497
self . stack . push ( Term :: Cos ( a) . into ( ) ) ;
492
498
self . handled += 1 ;
493
499
}
500
+ Exp => {
501
+ let a = self . pop ( ) ?;
502
+ let res = Expr :: from ( E ) . pow ( a) . ok_or ( AlgebraError :: TooComplex ) ?;
503
+ self . stack . push ( res) ;
504
+ self . handled += 1 ;
505
+ }
494
506
_ => return Err ( AlgebraError :: NotSupported ( prim. to_string ( ) ) ) ,
495
507
} ,
496
508
Mod ( prim, args, _) => match prim {
You can’t perform that action at this time.
0 commit comments