() of () (Operators): Difference between revisions

() of () (Operators)
Content deleted Content added
Added examples for other operators, and important info about the trig functions
No edit summary
 
(One intermediate revision by the same user not shown)
Line 30:
| acos || Arccosine (inverse cosine) || Entering 0.5 would result in 60, and entering 0 would result in 90.
|-
| atan || Arctangent (inverse tangent) || Entering 1 would result in 45, since the tangent of 45 degrees is 1.
|-
| ln || Natural log (log base e) || Entering the [[e]] operator would result in 1, and entering 2 would result in a value around 0.693.
Line 36:
| log || Log base 10 || Entering 10 would result in 1, and entering 2 would result in a value that is around 0.301
|-
| e ^ || Exp function (e^x) || Entering 1 would result in e, or Euler's number
|-
| 10 ^ || Raises 10 to a specific power || Entering 3 would result in 1000, and entering 6 would result in 1000000.
|}
==Workarounds==
e ^ and 10 ^ can be replicated by using the [[() (v) ()]] block, with 10 or the [[e]] reporter block as the first input, and "^" selected. ln and log can work around each other by using the change of base formula for logarithms, and can also be worked around using the () (v) () block with log selected.:
<scratchblocks>
(10) [^ v] (number::grey)::operators reporter
 
(e::operators) [^ v] (number::grey)::operators reporter
</scratchblocks>
ln and log can work around each other by using the change of base formula for logarithms, and can also be worked around using the () (v) () block with log selected:
<scratchblocks>
//ln workarounds
([log v] of (number::grey)) / ([log v] of (e::operators))
(e::operators) [log v] (number::grey)::operators reporter
//log workarounds
([ln v] of (number::grey)) / ([ln v] of (10))
(10) [log v] (number::grey)::operators reporter
</scratchblocks>
abs can be worked around using the sqrt option on the square of the number, or by multiplying the number by the sign of the number using the [[sign of ()]] reporter block:
<scratchblocks>
[sqrt v] of ((number::grey) [^ v] (2)::operators)
[sqrt v] of ((number::grey) * (number::grey))
 
(number::grey) * (sign of (number::grey))
</scratchblocks>
sin(90 - x) = cos(x) and cos(90 - x) = sin(x). tan(x) = sin(x)/cos(x), so that option can be worked around by using the sin and cos options.
{{DISPLAYTITLE:() of ()}}
{{Blockcat|type=Reporter|sc=y|cat=Operators}}
[[Category:Vanilla Blocks]]
[[Category:Reporter Blocks]]
[[Category:Operators Blocks]]