[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

float numbers

It appears that KCL compiler is not handling (generating)
floating numbers properly.
The following script indicates that KCL compiler always 
converts a floating point number to long-float, even when 
the program explicitly specified short-float.

Hong-Tai Chou, MCC

>(defun foo () 2.0S0)FOO
(type-of (foo))SHORT-FLOAT
(compile 'foo)End of Pass 1.  
End of Pass 2.  
OPTIMIZE levels: Safety=2, Space=2, Speed=3
(type-of (foo))LONG-FLOAT

What we really wants is to change the default float format 
to short-float (or equate single-float to short-float).
Representing small numbers, such as 1.0, as double precision 
floating numbers is quite inefficient for our system.
We would appreciate any suggestion to get around that problem.