18#ifndef _DECAF_LANG_FLOAT_H_
19#define _DECAF_LANG_FLOAT_H_
50 static const float NaN;
92 return this->value == f.value;
101 return this->value == f.value;
111 return this->value < f.value;
129 return this->value == f;
138 return this->value == f;
148 return this->value < f;
161 return (
double) this->value;
177 return (
unsigned char) this->value;
185 return (
short) this->value;
193 return (
int) this->value;
201 return (
long long) this->value;
418 static const unsigned int SINGLE_EXPONENT_MASK;
419 static const unsigned int SINGLE_MANTISSA_MASK;
420 static const unsigned int SINGLE_NAN_BITS;
This interface imposes a total ordering on the objects of each class that implements it.
Definition Comparable.h:33
virtual int compareTo(const float &f) const
Compares this Float instance with another.
virtual unsigned char byteValue() const
Answers the byte value which the receiver represents.
Definition Float.h:176
static Float valueOf(float value)
Returns a Float instance representing the specified float value.
virtual ~Float()
Definition Float.h:75
static bool isNaN(float value)
Checks and returns whether the given float is equal to NaN.
Float(const String &value)
virtual int compareTo(const Float &f) const
Compares this Float instance with another.
virtual bool operator==(const Float &f) const
Compares equality between this object and the one passed.
Definition Float.h:100
virtual double doubleValue() const
Answers the double value which the receiver represents.
Definition Float.h:160
static std::string toHexString(float value)
Returns a hexadecimal string representation of the float argument.
static float intBitsToFloat(int bits)
Returns the float value corresponding to a given bit representation.
bool equals(const float &f) const
Definition Float.h:128
static bool isInfinite(float value)
std::string toString() const
static const float MAX_VALUE
The maximum value that the primitive type can hold.
Definition Float.h:44
static float parseFloat(const String &value)
Returns a new float initialized to the value represented by the specified string, as performed by the...
static const float NEGATIVE_INFINITY
Constant for Negative Infinity.
Definition Float.h:56
virtual bool operator<(const Float &f) const
Compares this object to another and returns true if this object is considered to be less than the one...
Definition Float.h:110
virtual long long longValue() const
Answers the long value which the receiver represents.
Definition Float.h:200
static int floatToIntBits(float value)
Returns a representation of the specified floating-point value according to the IEEE 754 floating-poi...
virtual int intValue() const
Answers the int value which the receiver represents.
Definition Float.h:192
virtual float floatValue() const
Answers the float value which the receiver represents.
Definition Float.h:168
virtual short shortValue() const
Answers the short value which the receiver represents.
Definition Float.h:184
static const float NaN
Constant for the Not a Number Value.
Definition Float.h:50
static int compare(float f1, float f2)
Compares the two specified double values.
bool equals(const Float &f) const
Definition Float.h:91
virtual bool operator<(const float &f) const
Compares this object to another and returns true if this object is considered to be less than the one...
Definition Float.h:147
static std::string toString(float value)
Returns a string representation of the float argument.
static Float valueOf(const String &value)
Returns a Float instance that wraps a primitive float which is parsed from the string value passed.
static int floatToRawIntBits(float value)
Returns a representation of the specified floating-point value according to the IEEE 754 floating-poi...
static const float POSITIVE_INFINITY
Constant for Positive Infinity.
Definition Float.h:53
static const float MIN_VALUE
The minimum value that the primitive type can hold.
Definition Float.h:47
virtual bool operator==(const float &f) const
Compares equality between this object and the one passed.
Definition Float.h:137
static const int SIZE
The size in bits of the primitive int type.
Definition Float.h:41
The abstract class Number is the superclass of classes Byte, Double, Float, Integer,...
Definition Number.h:35
An immutable sequence of characters.
Definition String.h:57
#define DECAF_API
Definition Config.h:29
Definition ThreadingTypes.h:31
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25