Class LossOfPrecisionException

All Implemented Interfaces:
Serializable, ApfloatLocalizedException

public class LossOfPrecisionException extends NumericComputationException
Exception indicating a result that would have no significant digits.

An example would be ApfloatMath.sin(new Apfloat(1e100)). Rather than returning an arbitrary result, this exception should be thrown.

Note that a subtraction where a complete loss of digits occurs does not throw this exception but instead just returns zero.

Since:
1.5
Version:
1.15.0
Author:
Mikko Tommila
See Also:
  • Constructor Details

    • LossOfPrecisionException

      public LossOfPrecisionException()
      Constructs a new apfloat loss of precision exception with an empty detail message.
    • LossOfPrecisionException

      public LossOfPrecisionException(String message)
      Constructs a new apfloat loss of precision exception with the specified detail message.
      Parameters:
      message - The detail message.
    • LossOfPrecisionException

      public LossOfPrecisionException(String message, Throwable cause)
      Constructs a new apfloat loss of precision exception with the specified detail message and cause.
      Parameters:
      message - The detail message.
      cause - Originating cause of the exception.
    • LossOfPrecisionException

      public LossOfPrecisionException(String message, String localizationKey, Object... localizationArgs)
      Constructs a new apfloat loss of precision exception with the specified detail message and localization data.
      Parameters:
      message - The detail message.
      localizationKey - The localization key.
      localizationArgs - The localization arguments.
      Since:
      1.15.0
    • LossOfPrecisionException

      public LossOfPrecisionException(String message, Throwable cause, String localizationKey, Object... localizationArgs)
      Constructs a new apfloat loss of precision exception with the specified detail message, cause and localization data.
      Parameters:
      message - The detail message.
      cause - Originating cause of the exception.
      localizationKey - The localization key.
      localizationArgs - The localization arguments.
      Since:
      1.15.0