add BigDecimal todo

This commit is contained in:
Gwenhael Le Moine 2022-02-02 16:42:19 +01:00
parent a512979e91
commit 96868a742f
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
2 changed files with 4 additions and 2 deletions

View file

@ -3,5 +3,6 @@
https://github.com/louisrubet/rpn/ inspired language in ruby
# TODO-list
* generalize use of BigDecimal in :numeric's
* pseudo filesystem: subdir for variables
* UI toolkit (based on https://github.com/AndyObtiva/glimmer-dsl-libui ?)

View file

@ -57,8 +57,9 @@ class TesttLanguageOperations < Test::Unit::TestCase
def test_dr
lang = Rpl::Language.new
lang.run '30 d→r'
assert_equal [{ value: 0.5235987756, type: :numeric, base: 10 }],
lang.run '90 d→r'
assert_equal [{ value: BigDecimal( 1.57079632679489661923132169168272243847381663981000003, Rpl::Lang::Core.precision ),
type: :numeric, base: 10 }],
lang.stack
end