Real constants and functions: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) No edit summary |
|||
Line 33: | Line 33: | ||
ceil(x) // ceiling |
ceil(x) // ceiling |
||
x ^ y // exponentiation</lang> |
x ^ y // exponentiation</lang> |
||
=={{header|6502 Assembly}}== |
|||
None of these are built-in, irrational constants are best implemented with lookup tables. |
|||
Absolute value can be handled like so: |
|||
<lang 6502asm>GetAbs: ;assumes value we want to abs() is loaded into accumulator |
|||
eor #$ff |
|||
clc |
|||
adc #1 |
|||
rts</lang> |
|||
=={{header|ACL2}}== |
=={{header|ACL2}}== |