Sign of (): Difference between revisions

From PenguinMod Wiki
Sign of ()
Jump to navigation Jump to search
Content added Content deleted
(Created page with "<!--{{Infobox Block |block_type = Reporter Block |category = Extra Mathematics |title = sign of () |block_ }}--> The '''sign of ()''' block is a reporter block in the Extra Mathematics extension that reports the sign function of the inputted number, which returns -1 for negative numbers, 0 for zero, and 1 for positive numbers. ==Workaround== This block can be worked around by using the following: The + (0) is used to get 0 when 0 is the number, rather than NaN....")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<!--{{Infobox Block
{{Infobox Block
|block_type = Reporter Block
|block_type = Reporter Block
|category = [[Extra Mathematics]]
|category = [[Extra Mathematics]]
|title = sign of ()
|title = sign of ()
|block_name = sign of ()::#7ac94f reporter
|block_
}}-->
}}
The '''sign of ()''' block is a reporter block in the [[Extra Mathematics]] extension that reports the sign function of the inputted number, which returns -1 for negative numbers, 0 for zero, and 1 for positive numbers.
The '''sign of ()''' block is a reporter block in the [[Extra Mathematics]] extension that reports the sign function of the inputted number, which returns -1 for negative numbers, 0 for zero, and 1 for positive numbers. The default value is 0.
==Workaround==
==Workaround==
This block can be worked around by using the following:
This block can be worked around by using the following:<br>
[[() + ()|<sb>((([abs v] of (number::grey)) / (number::grey)) + (0))</sb>]]<br>

The + (0) is used to get 0 when 0 is the number, rather than NaN.
The + (0) is used to get 0 when 0 is the number, rather than NaN.
==See also==
==See also==
*[[() of ()]]
*[[() of ()]]
<!--{{DISPLAYTITLE:sign of ()}}
{{DISPLAYTITLE:sign of ()}}
[[Category:Reporter Blocks]]
[[Category:Reporter Blocks]]
[{Category:Extra Mathematics Blocks]]
[[Category:Extra Mathematics Blocks]]
[[Category:Extension Blocks]]
-->

Latest revision as of 01:58, 28 June 2024

sign of ()
sign of ()::#7ac94f reporter
Caption
Block Type Reporter Block
Category / Extension Extra Mathematics
Status Who tf uses status

The sign of () block is a reporter block in the Extra Mathematics extension that reports the sign function of the inputted number, which returns -1 for negative numbers, 0 for zero, and 1 for positive numbers. The default value is 0.

Workaround

This block can be worked around by using the following:
((([abs v] of (number::grey)) / (number::grey)) + (0))
The + (0) is used to get 0 when 0 is the number, rather than NaN.

See also