摘要 |
Methods and an apparatus for compiling a transcendental floating-point operation are disclosed. The disclosed techniques compile a transcendental floating-point operation by replacing the transcendental floating-point operation with an integer-based routine (e.g., a single routine) hand-coded to perform the transcendental floating-point operation. Each of the instructions in the integer-based routine, including the integer operations, is compiled directly into opcodes without primitive floating-point emulation calls. As a result, function nesting is reduced and more efficient algorithms are used. The disclosed system does not simply emulate basic floating-point operations using integer operations. Instead, portions of the computation are isolated where fixed-point accuracy is sufficient and thus native integer computations can be used. For example, computing (log(1+Z)-Z)/Z instead of computing log(1+Z).
|