Logarithm: Difference between revisions
Nikitaivanov (talk | contribs) (Created page with "Outputs the logarithm of a number by a given base. File:Logarithm1.png Inputs * Number: The target number * Base: The base to raise (defaults to [*e*](https://en.wikipedia.org/wiki/E_(mathematical_constant)) if unwired) Outputs * Logarithm: The Exponent in the (Base ^ Exponent = Number) == Notes == Logarithm is used as an inverse function for the function Power. This function is most commonly used for board game AIs. If you manage to learn how to make an AI,...") |
(Updated and revisited the page) |
||
Line 1: | Line 1: | ||
Outputs the logarithm of a number by a given base. | {{Block | ||
|image=Logarithm.png | |||
|type=s | |||
|folder=math | |||
|input1={{Port|n}} | |||
|input2={{Port|n|Base}} | |||
|output1={{Port|n|Logarithm}} | |||
}} | |||
Outputs the logarithm of a [[number]] by a given base. | |||
[[ | Logarithm is a number such that <code>Base [[Power|^]] Exponent = Base</code> | ||
== Notes == | == Notes == | ||
Logarithm is used as an inverse function for the function [[Power]]. | * Logarithm is used as an inverse function for the function [[Power]]. | ||
* Base defaults to [https://en.wikipedia.org/wiki/E_(mathematical_constant) ''e''] if unwired. | |||
== Examples == | == Examples == | ||
* You can compute a number's length by plugging 10 into the base, then flooring it and adding 1. | |||
{{Image|Logarithm example.jpg|Example}} | |||
[[Category:Blocks]] | [[Category:Blocks]] |
Revision as of 13:57, 20 May 2024
Logarithm
Type | Script block |
Collider | None |
Folder | Math |
Ports | |
---|---|
Inputs | Number Base |
Outputs | Logarithm |
Outputs the logarithm of a number by a given base.
Logarithm is a number such that Base ^ Exponent = Base
Notes
Examples
- You can compute a number's length by plugging 10 into the base, then flooring it and adding 1.
