isodd

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 1.0, Creation date: 2012-07-15, Last change: 2025-09-14

returns whether a numer is even or odd

Description

r=(mod(x,2)~=0)

See Also: , isintegerbv

Example Illustration

 missing image of isodd(x)

Syntax

r=isodd(x)

Input Parameter

x: number

Output Parameter

r: true if odd




Copyright 2012-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

This function, isodd, determines whether a given number x is odd.

Input Parameters

Output Results

Algorithm Explanation

The function uses the modulus operation to determine if a number is odd. The modulus operation mod(x,2) calculates the remainder when x is divided by 2.

Additional Information

This function is part of the SolidGeometry library and was introduced in version 1.0. It is categorized under auxiliary procedures and was created by Tim C. Lueth.

Related functions include isinteger and isintegerbv, which may be used for checking integer properties.

Algorithm explaination created using ChatGPT on 2025-08-18 21:51. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21