diff --git a/lib/core/logarithm.rb b/lib/core/logarithm.rb index 17e8745..046decf 100644 --- a/lib/core/logarithm.rb +++ b/lib/core/logarithm.rb @@ -10,39 +10,108 @@ module RplLang 'Logs on reals and complexes', '( … -- ℇ ) push ℇ', proc do - @stack << { type: :numeric, - base: 10, - value: BigMath.E( @precision ) } - end ) - # @dictionary.add_word( 'ln', - # proc { __todo } ) # logarithm base e - # @dictionary.add_word( 'lnp1', - # proc { __todo } ) # ln(1+x) which is useful when x is close to 0 - # @dictionary.add_word( 'exp', - # proc { __todo } ) # exponential - # @dictionary.add_word( 'expm', - # proc { __todo } ) # exp(x)-1 which is useful when x is close to 0 - # @dictionary.add_word( 'log10', - # proc { __todo } ) # logarithm base 10 - # @dictionary.add_word( 'alog10', - # proc { __todo } ) # exponential base 10 - # @dictionary.add_word( 'log2', - # proc { __todo } ) # logarithm base 2 - # @dictionary.add_word( 'alog2', - # proc { __todo } ) # exponential base 2 - # @dictionary.add_word( 'sinh', - # proc { __todo } ) # hyperbolic sine - # @dictionary.add_word( 'asinh', - # proc { __todo } ) # inverse hyperbolic sine - # @dictionary.add_word( 'cosh', - # proc { __todo } ) # hyperbolic cosine - # @dictionary.add_word( 'acosh', - # proc { __todo } ) # inverse hyperbolic cosine - # @dictionary.add_word( 'tanh', - # proc { __todo } ) # hyperbolic tangent - # @dictionary.add_word( 'atanh', - # proc { __todo } ) # inverse hyperbolic tangent + @stack << { type: :numeric, + base: 10, + value: BigMath.E( @precision ) } + end ) + # @dictionary.add_word( ['ln'], + # 'Logs on reals and complexes', + # 'logarithm base e', + # proc do + + # end ) + + # @dictionary.add_word( ['lnp1'], + # 'Logs on reals and complexes', + # 'ln(1+x) which is useful when x is close to 0', + # proc do + + # end ) + + # @dictionary.add_word( ['exp'], + # 'Logs on reals and complexes', + # 'exponential', + # proc do + + # end ) + + # @dictionary.add_word( ['expm'], + # 'Logs on reals and complexes', + # 'exp(x)-1 which is useful when x is close to 0', + # proc do + + # end ) + + # @dictionary.add_word( ['log10'], + # 'Logs on reals and complexes', + # 'logarithm base 10', + # proc do + + # end ) + + # @dictionary.add_word( ['alog10'], + # 'Logs on reals and complexes', + # 'exponential base 10', + # proc do + + # end ) + + # @dictionary.add_word( ['log2'], + # 'Logs on reals and complexes', + # 'logarithm base 2', + # proc do + + # end ) + + # @dictionary.add_word( ['alog2'], + # 'Logs on reals and complexes', + # 'exponential base 2', + # proc do + + # end ) + + # @dictionary.add_word( ['sinh'], + # 'Logs on reals and complexes', + # 'hyperbolic sine', + # proc do + + # end ) + + # @dictionary.add_word( ['asinh'], + # 'Logs on reals and complexes', + # 'inverse hyperbolic sine', + # proc do + + # end ) + + # @dictionary.add_word( ['cosh'], + # 'Logs on reals and complexes', + # 'hyperbolic cosine', + # proc do + + # end ) + + # @dictionary.add_word( ['acosh'], + # 'Logs on reals and complexes', + # 'inverse hyperbolic cosine', + # proc do + + # end ) + + # @dictionary.add_word( ['tanh'], + # 'Logs on reals and complexes', + # 'hyperbolic tangent', + # proc do + + # end ) + + # @dictionary.add_word( ['atanh'], + # 'Logs on reals and complexes', + # 'inverse hyperbolic tangent', + # proc do + + # end ) end end end