[#BloombergLP-bdljsn-NumberUtil-areEqual] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/NumberUtil.adoc[NumberUtil]::areEqual :relfileprefix: ../../../ :mrdocs: Return `true` if the specified `lhs` and `rhs` represent the same numeric value, and `false` otherwise. == Synopsis Declared in `<bdljsn_numberutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static bool areEqual( std::string_view const& lhs, std::string_view const& rhs); ---- == Description This function will return `true` for differing representations of the same number (e.g., `1.0`, "1", "0.1e+1" are all equivalent) _except_ in cases where the exponent cannot be represented by a 64‐bit integer. If the exponent is outside the range of a 64‐bit integer, `true` will be returned if `lhs == rhs`. For example, comparing "1e18446744073709551615" with itself will return `true`, but comparing it to "10e18446744073709551614" will return `false`. The behavior is undefined unless `isValidNumber(lhs)` and `isValidNumber(rhs)`. == Return Value `true` if `lhs` and `rhs` represent the same numeric value, and `false` otherwise == Parameters [cols="1,4"] |=== | Name| Description | *lhs* | left‐hand JSON number text | *rhs* | right‐hand JSON number text |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#