Math Operations (Float)

BlockMath

Perform addition, subtraction, multiplication, division, modulo and exponent operations with floating point numbers.

Inputs

Value 1Required

First numeric value.

Example: 5.5

OperationRequired

Math operation to perform.

Options+ (addition)- (subtraction)÷ (division)× (multiplication)% (modulo)^ (exponent)
Value 2Required

Second numeric value.

Example: 2.5

Outputs

Result

Result of the math operation.

Example: 2.200000

Build a bot using blocks like Math Operations (Float)

Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.

Advanced Documentation

This documentation can be useful when using code mode. View as Markdown

ID: float_math_operations
  • Value block: it can be used directly inside expressions, e.g. "Result: " + float_math_operations(Args{...}).

Inputs

FieldInventScript nameValue
Value 1value_1e.g. "5.5"
Operationoperation"+ (addition)", "- (subtraction)", "÷ (division)", "× (multiplication)", "% (modulo)", "^ (exponent)"
Value 2value_2e.g. "2.5"

Outputs

FieldInventScript nameValue
Resultresulte.g. "2.200000"

Example InventScript

sum := 5.5 / 2.5
send_text_message(Args{channel_id: trigger.channel_id, message_content: "Result: " + sum})

More math blocks