Rpl::Core ⇒ Rpl::Lang::Core

This commit is contained in:
Gwenhael Le Moine 2021-12-15 13:33:06 +01:00
parent 68c8a4e178
commit 59c40c5bf9
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
2 changed files with 20 additions and 16 deletions

View file

@ -1,14 +1,16 @@
module Rpl
module Core
module_function
module Lang
module Core
module_function
# Euler constant
def e( stack, dictionary )
stack << { type: :numeric,
base: 10,
value: BigMath.E( Rpl::Core.precision ) }
# Euler constant
def e( stack, dictionary )
stack << { type: :numeric,
base: 10,
value: BigMath.E( Rpl::Core.precision ) }
[stack, dictionary]
[stack, dictionary]
end
end
end
end

View file

@ -1,14 +1,16 @@
module Rpl
module Core
module_function
module Lang
module Core
module_function
# pi constant
def pi( stack, dictionary )
stack << { type: :numeric,
base: 10,
value: BigMath.PI( Rpl::Core.precision ) }
# pi constant
def pi( stack, dictionary )
stack << { type: :numeric,
base: 10,
value: BigMath.PI( Rpl::Core.precision ) }
[stack, dictionary]
[stack, dictionary]
end
end
end
end