Difference between revisions of "Manuals/calci/FIXED"
Jump to navigation
Jump to search
Line 11: | Line 11: | ||
FIXED(4567.786,1) ''returns 4567.8'' | FIXED(4567.786,1) ''returns 4567.8'' | ||
+ | |||
+ | *'number' can be up to 15 bit number. If exceeded, Calci displays #ERROR! message. | ||
+ | |||
+ | * If 'number' is negative, Calci rounds the number to left of the decimal point. | ||
*Calci displays an #ERROR message, if number is non-numeric. | *Calci displays an #ERROR message, if number is non-numeric. | ||
− | *'decimals' is optional. If not mentioned, Calci assumes it | + | *'decimals' is optional. If not mentioned, Calci assumes it to be '2'. |
+ | |||
+ | *The result is displayed as a text. | ||
== Examples == | == Examples == | ||
Line 26: | Line 32: | ||
|- class="odd" | |- class="odd" | ||
− | | class="sshl_f" | | + | | class="sshl_f" | FIXED(35.56,1) |
− | | class="sshl_f" | | + | | class="sshl_f" | 35.6 |
|- class="even" | |- class="even" | ||
− | | class="sshl_f" | | + | | class="sshl_f" | FIXED(99999.9,4) |
− | | class="sshl_f" | | + | | class="sshl_f" | 99999.9000 |
|- class="odd" | |- class="odd" | ||
− | | class="sshl_f" | | + | | class="sshl_f" | FIXED(-45) |
− | | class="sshl_f" | | + | | class="sshl_f" | -45.00 |
|- class="even" | |- class="even" | ||
− | | class="sshl_f" | | + | | class="sshl_f" | FIXED(7866.44,-2) |
− | | class="sshl_f" | | + | | class="sshl_f" | 7900 |
|} | |} |
Revision as of 15:44, 19 November 2013
FIXED(number, decimals)
- where 'number' is the number to round, and
- 'decimals' is the number of digits after the decimal point.
FIXED() rounds a number to the specified number of decimals, and displays the result as text.
Description
FIXED(number, decimals)
FIXED(4567.786,1) returns 4567.8
- 'number' can be up to 15 bit number. If exceeded, Calci displays #ERROR! message.
- If 'number' is negative, Calci rounds the number to left of the decimal point.
- Calci displays an #ERROR message, if number is non-numeric.
- 'decimals' is optional. If not mentioned, Calci assumes it to be '2'.
- The result is displayed as a text.
Examples
Function | Output |
FIXED(35.56,1) | 35.6 |
FIXED(99999.9,4) | 99999.9000 |
FIXED(-45) | -45.00 |
FIXED(7866.44,-2) | 7900 |