java.lang.Object
ortus.boxlang.runtime.bifs.BIF
ortus.boxlang.runtime.bifs.global.math.Log

@BoxBIF(description="Calculate the natural logarithm of a number") @BoxMember(type=NUMERIC) public class Log extends BIF
  • Constructor Details

    • Log

      public Log()
      Constructor
  • Method Details

    • _invoke

      public Object _invoke(IBoxContext context, ArgumentsScope arguments)
      Returns the natural logarithm of a number.
      Specified by:
      _invoke in class BIF
      Parameters:
      context - The context in which the BIF is being invoked.
      arguments - Argument scope for the BIF.
      Returns:
      The result of the invocation
    • log

      public static BigDecimal log(BigDecimal value, MathContext mc)
      Computes the natural logarithm of a BigDecimal using Newton's method.
      Parameters:
      value - The BigDecimal value to compute the logarithm for.
      mc - The MathContext to control the precision.
      Returns:
      The natural logarithm of the value.