Package hydra.lib.literals
Class BigfloatToFloat64
java.lang.Object
hydra.tools.PrimitiveFunction
hydra.lib.literals.BigfloatToFloat64
Primitive function which converts a bigfloat (arbitrary-precision decimal) to a float64 (64-bit floating-point).
This conversion may result in loss of precision.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Doubleapply(BigDecimal value) Converts a BigDecimal value to a Double (64-bit).Provides the implementation of this primitive function.name()Returns the unique name identifying this primitive function.type()Returns the type scheme for this function: bigfloat -> float64.Methods inherited from class hydra.tools.PrimitiveFunction
term, toNative
-
Constructor Details
-
BigfloatToFloat64
public BigfloatToFloat64()
-
-
Method Details
-
name
Returns the unique name identifying this primitive function.- Specified by:
namein classPrimitiveFunction- Returns:
- the function name "hydra.lib.literals.bigfloatToFloat64"
-
type
Returns the type scheme for this function: bigfloat -> float64.- Specified by:
typein classPrimitiveFunction- Returns:
- the type scheme representing the function signature
-
implementation
Provides the implementation of this primitive function.- Specified by:
implementationin classPrimitiveFunction- Returns:
- a function that converts bigfloat terms to float64 terms
-
apply
Converts a BigDecimal value to a Double (64-bit).- Parameters:
value- the BigDecimal value to convert- Returns:
- the Double representation of the value
-