#ifndef __NUMBERS_REAL_H #define __NUMBERS_REAL_H #include #include "Numbers/Small" #include "Values/Values" #include <5D/Operations> namespace Numbers { #if defined(__VFP_FP__) || defined(__ARM_EABI__) /* ARM doesn't have extended-precision floating point */ typedef double NativeFloat; //#define NATIVEFLOAT_PRECISION 15 #else typedef long double NativeFloat; //#define NATIVEFLOAT_PRECISION 19 #endif Values::NodeT internNative(NativeFloat value); DECLARE_SMALL_VALUE(Float, NativeFloat) DECLARE_SIMPLE_OPERATION(FloatP) struct Real : Values::Node { NativeFloat* parts; }; Values::NodeT operator+(const Float& a, const Float& b); Values::NodeT operator-(const Float& a, const Float& b); Values::NodeT operator*(const Float& a, const Float& b); Values::NodeT operator/(const Float& a, const Float& b); Real* operator+(const Real& a, const Real& b); Real* operator-(const Real& a, const Real& b); Real* operator*(const Real& a, const Real& b); Real* operator/(const Real& a, const Real& b); Values::NodeT operator<=(const Float& a, const Float& b); Values::NodeT operator<=(const Real& a, const Real& b); bool toNativeFloat(Values::NodeT node, NativeFloat& result); bool float_P(Values::NodeT node); Values::NodeT nan(void); Values::NodeT infinity(void); }; #endif /* ndef __NUMBERS_REAL_H */