Loading

Function | Description | Example | Result |
---|---|---|---|

ceiling(number, factor) | Rounds 'number' up to a multiple of 'factor'. (Floor and Ceiling) | ceiling(73, 10) | 80 |

even(x) | Rounds a number to the next even integer away from zero. | even(2.5) | 4 |

floor(number, factor) | Rounds 'number' down to a multiple of 'factor'. (Floor and Ceiling) | floor(73, 10) | 70 |

fmod(number, denominator) | Returns the remainder when one integer is divided by another. Result has same sign as dividend. The fmod() functions conform to ISO/IEC 9899:1999(E).(Modulo operation) | fmod(-8, 3) | -2 |

int(x) | Rounds a number down to the nearest integer. | int(-7.9) | -8 |

mod(number, denominator) | The remainder when one integer is divided by another. Result has same sign as divisor. (Modulo operation) | mod(-8, 3) | 1 |

mround(number, factor) | A number rounded to the nearest multiple of another number. | mround(4.5, 3) | 6 |

odd(x) | Rounds a number up to the next highest odd integer. | odd(2.5) | 3 |

quotient(number, denominator) | The integer result of a division operation. | quotient(5.99, 2) | 2 |

round(number, digits) | Rounds a number to the specified digits. | round(mpi, 3) | 3.142 |

rounddown(number, digits) | Rounds a number down, toward zero, to the specified digits. | rounddown( 1111.222, -2) | 1100 |

roundup(number, digits) | Rounds a number up, away from zero, to the specified digits. | roundup( 1111.222, -2) | 1200 |

trunc(number, digits) | Truncates a number by removing decimal places. | trunc( 1.23456, 3) | 1.234 |