|
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 floating-point arithmetic. Currently, Float is merely a Computer Algebra Kit compatible interface to plain C floating-point arithmetic. Instances are object wrappers around the float datatype; arithmetic is subject to the same limitations, round-off errors etc. as in C.Support for floating-point 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 floating-point 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.
zero-zeroReturns a new reference to a shared float instance with value equal to zero.
one-oneReturns a new reference to a shared float instance with value equal to one.
minusOne-minusOneReturns a new reference to the float minus one.
printsLeadingSign- (BOOL)printsLeadingSignReturns YES if the number is negative.
printOn:-printOn:(IOD)aFilePrints the floating-point number to aFile according to the '%g' format of the ANSI function printf().
|