Files
IronCalc/docs/src/functions/math_and_trigonometry/odd.md
Elsa Minsut a2d11a42cc update: adds docs, unit tests and xlsx tests for EVEN and ODD functions (#517)
* update: adds unit test for EVEN and ODD functions

* update: adds xlsx test for EVEN and ODD functions

* update: adds EVEN and ODD doc pages

* update: Math and Trigonometry main page links to new functions

* update: changes to functions badge type in main Math and Trigonometry page
2025-11-07 04:26:01 +01:00

2.1 KiB

layout, outline, lang
layout outline lang
doc deep en-US

ODD function

Overview

ODD is a function of the Math and Trigonometry category that rounds a number up (away from zero) to the nearest odd integer.

Usage

Syntax

ODD(number) => odd

Argument descriptions

  • number (number, required). The number that is to be rounded to the nearest odd integer.

Additional guidance

  • ODD rounds away from zero, meaning:
    • Positive numbers are rounded up to the next odd integer.
    • Negative numbers are rounded down (toward negative infinity) to the next odd integer.
  • If the number argument is already an odd integer, ODD returns it unchanged.
  • Since zero is considered an even number, the ODD function returns 1 when number is 0.

Returned value

ODD returns a number that is the nearest odd integer, rounded away from zero.

Error conditions

  • In common with many other IronCalc functions, ODD propagates errors that are found in its argument.
  • If no argument, or more than one argument, is supplied, then ODD returns the #ERROR! error.
  • If the value of the number argument is not (or cannot be converted to) a number, then ODD returns the #VALUE! error.