diff --git a/README.md b/README.md index 698e869..da26a41 100644 --- a/README.md +++ b/README.md @@ -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 ?) diff --git a/spec/language_trig_spec.rb b/spec/language_trig_spec.rb index 1065365..3893ce9 100644 --- a/spec/language_trig_spec.rb +++ b/spec/language_trig_spec.rb @@ -57,8 +57,9 @@ class TesttLanguageOperations < Test::Unit::TestCase def test_d→r 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