sin
ErrorsCollection

sin

Synthesised documentation from type/Cool

From type/Cool

See Original text in context

sub sin(Numeric(Cool))
method sin()

Coerces the invocant (or in the sub form, the argument) to Numeric, interprets it as radians, returns its sine.

say sin(0);             # OUTPUT: «0␤» 
say sin(pi/4);          # OUTPUT: «0.707106781186547␤» 
say sin(pi/2);          # OUTPUT: «1␤»

Note that Raku is no computer algebra system, so sin(pi) typically does not produce an exact 0, but rather a very small Num.