Skip to content

Commit

Permalink
Uses value for the E from the decimal library. (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
DurvalMenezes authored Nov 17, 2024
1 parent 6184a22 commit 3c7b38f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func newOpsType(ctx decimal.Context, stack *stackType) *opsType {
return []*decimal.Big{ctx.Pi(big())}, 0, nil
}},
ophandler{"E", "Another famous transcedental number", 0, func(_ []*decimal.Big) ([]*decimal.Big, int, error) {
return []*decimal.Big{bigFloat("2.71828182845904523536028747135266249775724709369995957496696763")}, 0, nil
return []*decimal.Big{ctx.E(big())}, 0, nil
}},
ophandler{"C", "Speed of light in vacuum, in m/s", 0, func(_ []*decimal.Big) ([]*decimal.Big, int, error) {
return []*decimal.Big{bigFloat("299792458")}, 0, nil
Expand Down

0 comments on commit 3c7b38f

Please # to comment.