Logarithm

BlockMath

Get the logarithm of a number with a specified base.

Inputs

NumberRequired

Number to take the logarithm of.

Example: 1000

Base

Base for the logarithm. Defaults to 10 if not provided.

Example: 10

Outputs

Logarithm

Logarithm result.

Example: 3

Build a bot using blocks like Logarithm

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: logarithm_basic
  • Value block: it can be used directly inside expressions, e.g. "Result: " + logarithm_basic(Args{...}).

Inputs

FieldInventScript nameValue
Numbernumbere.g. "1000"
Basebasee.g. "10"

Outputs

FieldInventScript nameValue
Logarithmlogarithme.g. "3"

Example InventScript

logarithm := logarithm_basic(Args{number: 1000})
send_text_message(Args{channel_id: trigger.channel_id, message_content: "Logarithm: " + logarithm})

More math blocks