
cfloat Specification SheetComputer Algebra Kit (c) 1993,00 by Comp.Alg.Objects. All Rights Reserved.
FloatInherits from: CAObjectMaturity Index: Immature
Class DescriptionIt is planned to make this class evolve into an Objective C class for arbitrary precision floatingpoint arithmetic. Currently, Float is merely a Computer Algebra Kit compatible interface to plain C floatingpoint arithmetic. Instances are object wrappers around the float datatype; arithmetic is subject to the same limitations, roundoff errors etc. as in C.Support for floatingpoint arithmetic is minimal in the Computer Algebra Kit; it is possible to convert results that are obtained by exact arithmetic to a numerical approximation (see the method asNumerical of Integer, Matrix, Polynomial etc.) for further processing by numerical analysis software.
Method typesCreationIdentityComparingAdditionMultiplicationPrintingMethodsnew+newCreates an floatingpoint object equal to zero.
floatValue:+floatValue:(float)floatValueCreates an object with value equal to floatValue.
str:+str:(STR)aStringReturns a new float object given a string aString, or returns nil if the method can't parse aString. This method acts like the ANSI function atof().
floatValue (float)floatValueReturns the value of the object.
floatValue:floatValue:(float)fCreates an object with value f.
zerozeroReturns a new reference to a shared float instance with value equal to zero.
oneoneReturns a new reference to a shared float instance with value equal to one.
minusOneminusOneReturns a new reference to the float minus one.
printsLeadingSign (BOOL)printsLeadingSignReturns YES if the number is negative.
printOn:printOn:(IOD)aFilePrints the floatingpoint number to aFile according to the '%g' format of the ANSI function printf().
