h6. [[VFPSupport]] h6(. » [[VFPSupport SWI Calls|SWI Calls]] h6((. » VFPSupport_ElementaryFunctions h2. VFPSupport_ElementaryFunctions h5. (SWI &58ECA) |_<^{width:4em}. Entry | | |<^. R0 |Flags (reserved for future use, set to 0) | |_<^{width:4em}. Exit | | |<^. R0 |Number of functions provided by this version of VFPSupport | |<^. R1 |Pointer to branch table for single precision functions | |<^. R2 |Pointer to branch table for double precision functions | |\2. All other registers preserved | h4. Use This call returns tables of VFP implementations of the elementary functions, jumping to the Nth table entry will run one of the following functions which are given their C standard function names for convenience here, but other languages may give them different names: |_<^{width:4em}. Table entry |_. C name |_. Equivalent FPA op |_. Equivalent VFP op | |<^. 0 | sin(x) | SIN | - | |<^. 1 | cos(x) | COS | - | |<^. 2 | tan(x) | TAN | - | |<^. 3 | asin(x) | ASN | - | |<^. 4 | acos(x) | ACS | - | |<^. 5 | atan(x) | ATN | - | |<^. 6 | atan2(y,x) | POL | - | |<^. 7 | log(x) | LGN | - | |<^. 8 | log10(x) | LOG | - | |<^. 9 | exp(x) | EXP | - | |<^. 10 | pow(x,y) | POW | - | |<^. 11 | fma(x,y,z) | - | VFMA | h4. Notes When calling the above functions, the following rules apply: * The functions will preserve 8 byte stack alignment * D0-D7 (or S0-S15 for single precision), plus the usual APCS registers (a1-a4, ip, lr) may be corrupted during the call * Flush to zero mode must be off In the event of an exception during calculations, the corresponding FPSCR cumulative flags bits will be updated and optionally a floating point error thrown if enabled in the exception trap bits. h4. See also * [[VFPSupport_FastAPI]]