ComputerArithmetic`
ComputerArithmetic`

SetArithmetic

SetArithmetic[d]

sets the number of digits of precision d to be used in ComputerNumber objects.

SetArithmetic[d,b]

sets the number of digits of precision d and the base b to be used in ComputerNumber objects.

Details and Options

  • To use SetArithmetic, you first need to load the Computer Arithmetic Package using Needs["ComputerArithmetic`"].
  • Allowable settings for the precision d are the integers between 1 and 10 inclusive. The default value is 4.
  • Allowable settings for the base b are the integers between 2 and 16 inclusive. The default value is 10.
  • Changing the default settings to be used in ComputerNumber objects and then referring to ComputerNumber objects defined prior to the change can lead to unpredictable results.
  • The following options can be given:
  • RoundingRuleRoundToEvenrule used to round numbers
    ExponentRange{-50,50}range of allowed exponents
    MixedModeFalsewhether to allow mixed-mode arithmetic
    IdealDivisionFalsewhether to convert / to IdealDivide