All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aspose.cells.CalculationPrecisionStrategy.html Maven / Gradle / Ivy

There is a newer version: 23.1
Show newest version





CalculationPrecisionStrategy




com.aspose.cells
Class CalculationPrecisionStrategy

java.lang.Object
    extended by com.aspose.cells.CalculationPrecisionStrategy

public class CalculationPrecisionStrategy 
extends java.lang.Object

Utility class containing constants. Enumerates strategies for handling calculation precision. Because of the precision issue of IEEE 754 Floating-Point Arithmetic, some "seemingly simple" formulas may not be calculated as the expected result. Such as formula "=-0.45+0.43+0.02", when calculating operands by '+' operator directly, the result is not zero. For such kind of precision issue, some special strategies may give the expected result.


Field Summary
static final intNONE
           No strategy applied on calculation. When calculating just use the original double value as operand and return the result directly. Most efficient for performance and applicable for most cases.
static final intROUND
           Rounds the calculation result according with significant digits.
static final intDECIMAL
           Uses decimal as operands when possible. Most inefficient for performance.
 

Field Detail

NONE

public static final int NONE
No strategy applied on calculation. When calculating just use the original double value as operand and return the result directly. Most efficient for performance and applicable for most cases.

ROUND

public static final int ROUND
Rounds the calculation result according with significant digits.

DECIMAL

public static final int DECIMAL
Uses decimal as operands when possible. Most inefficient for performance.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy