CUBE ROOT: Difference between revisions

From Macros Wiki
Jump to navigationJump to search
CatoH (talk | contribs)
calculate cube root
 
CatoH (talk | contribs)
No edit summary
Line 1: Line 1:
[[:Category:Internal_Macro_Functions|{{Up}}]]
[[:Category:Internal_Macro_Functions|{{Up}}]]


Not a function but the macro language supports calculation of cube root
Not a function but the macro language supports calculation of cube root


: ** = pow math command with 1/3 inverting it to the cube root.
: ** = pow math command with 1/3 inverting it to the cube root.
Line 7: Line 7:
===Example===
===Example===


:!cube root of 10 = 2.1544
:!cube root is the number which when multiplied by itself three times gives the product as 10
:number=10
:number=10
:cube_root=number**(1/3)
:cube_root=number**(1/3)

Revision as of 20:29, 21 February 2025

Up

Not a function but the macro language supports calculation of cube root ∛

** = pow math command with 1/3 inverting it to the cube root.

Example

!cube root of 10 = 2.1544
!cube root is the number which when multiplied by itself three times gives the product as 10
number=10
cube_root=number**(1/3)
message "the cube root of %number is %cube_root"