Skip to content

Float Condition

Evaluates a comparison between two floating-point numbers. Supports standard operations (==, !=, <, >, <=, >=) and returns a Boolean indicating the result. Designed for simple numeric checks to drive conditional logic in your workflow.
Preview

Usage

Use this node when you need to compare two numeric values and branch logic based on the result. Typical scenarios include threshold checks (e.g., confidence > 0.8), range validation, and gating subsequent node execution on numeric conditions.

Inputs

FieldRequiredTypeDescriptionExample
aTrueFLOATFirst float value to compare. Accepts a wide range of values.0.75
bTrueFLOATSecond float value to compare against.0.8
operationTrueSTRINGComparison operator to apply between a and b. One of: '==', '!=', '<', '>', '<=', '>='.>=

Outputs

FieldTypeDescriptionExample
resultBOOLEANTrue if the comparison evaluates to true, otherwise False.True

Important Notes

  • Exact equality (==) on floats can be sensitive to precision; consider using <= or >= if appropriate for thresholds.
  • Input ranges are large (-9.99999999999e11 to +9.99999999999e11). Values outside this range are not accepted.
  • The step is configured as 1 for the UI control, but inputs are floating-point; you can still provide non-integer floats via connections or manual entry.
  • On internal errors or unknown operations, the node returns False.

Troubleshooting

  • Unexpected False with '==' on floats: Floating-point precision may differ slightly. Use '<=' or '>=' around a tolerance if exact equality is unreliable.
  • Type errors or invalid input: Ensure both a and b are valid numbers. Non-numeric or None inputs will cause the comparison to fail and return False.
  • Wrong result direction: Double-check the selected operator (e.g., '<' vs '>') and confirm a and b are in the intended order.