Formualizer Docs

DELTA

Tests whether two numbers are equal.

Returns 1 when values match and 0 otherwise.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=DELTA(number1, [number2])

Arguments

ArgumentTypeRequiredDefault
number1numberRequired—
number2numberOptional—

Remarks

  • If number2 is omitted, it defaults to 0.
  • Inputs are numerically coerced.
  • Uses a small numeric tolerance for floating-point comparison.

Examples

Test whether two equal numbers match.

Formula =DELTA(4,4)

Expected result 1

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Compare unequal numbers.

Formula =DELTA(4,5)

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Omit the second argument to compare the first number against zero.

Formula =DELTA(0)

Expected result 1

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A nonnumeric argument cannot be compared as a number.

Formula =DELTA("invalid",4)

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Equal values

Formula =DELTA(5,5)

Expected result 1

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Default second argument

Formula =DELTA(2.5)

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

Does DELTA require exact floating-point equality?

It uses a small tolerance (1e-12), so values that differ only by tiny floating noise compare as equal.

Implementation

Engine source

On this page