Liquid Studio 2020
Data Mapping / Data Mapper Functions / By Category / Maths / IsOdd
In This Topic
    IsOdd
    In This Topic

    Function Name
    IsOdd
    Category
    Maths
    Icon
    Description
    Returns true if the value is odd.
    Inputs
    Value A numeric value.
    Outputs
    Result boolean : true if the input value is odd, otherwise false.

    Remarks

    Takes a numeric value strips off any fractional part and determines if its is an odd or even number (0 is even).

    If the input value is not numeric then an error is raised (unless an in place cast is defined).

    Examples

    Source Data
    Copy Code
    <?xml version="1.0" encoding="utf-8"?>
    <!-- Created with Liquid XML Studio (https://www.liquid-technologies.com) -->
    <Decimals xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="..\Common\Numbers.xsd">
        <Decimal>7194.954905803945093</Decimal>
        <Decimal>7570.634905803945093</Decimal>
        <Decimal>5754.914905803945093</Decimal>
        <Decimal>-7480.925094196054907</Decimal>
        <Decimal>-6851.065094196054907</Decimal>
    </Decimals>
    

     

    Output Data
    Copy Code
    <Booleans>
        <Boolean>false</Boolean>
        <Boolean>false</Boolean>
        <Boolean>false</Boolean>
        <Boolean>false</Boolean>
        <Boolean>true</Boolean>
    </Booleans>
    

    This is a scalar function so the standard rules apply if multiple values are presented to one or more inputs.