Jump to content

User:System86/Sin/doc

From Wikipedia, the free encyclopedia

Implements the mathematical sine function, from an input in radians. Implemented with the #expr parser function.

This template is now deprecated: historically, the trigonometric functions were not supported natively, and this template used a limited development (still visible in its history). Now you should use the supported function sin(radians) directly within the expression argument of the {{#expr:}} parser template (this template now uses it).

For the value of pi, you can also use now "pi" within #expr (historically, you had to provide a numeric constant value in expressions).

Usage:
{{Sin|radians}}
Examples:
  • sin(- π  ) = -1.2246467991474E-16
  • sin(-5π/6) = -0.5
  • sin(-3π/4) = -0.70710678118655
  • sin(-2π/3) = -0.86602540378444
  • sin(- π/2) = -1
  • sin(- π/3) = -0.86602540378444
  • sin(- π/4) = -0.70710678118655
  • sin(- π/6) = -0.5
  • sin(  0  ) = 0
  • sin(  π/6) = 0.5
  • sin(  π/4) = 0.70710678118655
  • sin(  π/3) = 0.86602540378444
  • sin(  π/2) = 1
  • sin( 2π/3) = 0.86602540378444
  • sin( 3π/4) = 0.70710678118655
  • sin( 5π/6) = 0.5
  • sin(  π  ) = 1.2246467991474E-16
  • sin( 3π/2) = -1
  • sin( 2π  ) = -2.4492935982947E-16
  • sin( 5π/2) = 1
  • sin( 3π  ) = 3.6739403974421E-16
  • sin( 7π/2) = -1
  • sin( 4π  ) = -4.8985871965894E-16
  • More complex example:
<div style="position:relative;width:600px;height:600px;font-family:serif;border:1px solid black;line-height:0.8">
<div style="position:absolute;left:{{#expr:300}}0px;bottom:{{#expr:300}}px">•<br />'''O'''</div>
<div style="position:absolute;left:{{#expr:300+200}}px;bottom:{{#expr:300}}px">•<br />0</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|pi/12}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|pi/12}} round 0}}px">•<br />π/12</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|pi/6}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|pi/6}} round 0}}px">•<br />π/6</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|pi/4}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|pi/4}} round 0}}px">•<br />π/4</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|pi/3}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|pi/3}} round 0}}px">•<br />π/3</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|5*pi/12}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|5*pi/12}} round 0}}px">•<br />5π/12</div>
<div style="position:absolute;left:{{#expr:300}}px;bottom:{{#expr:300+200}}px">•<br />π/2</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|7*pi/12}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|7*pi/12}} round 0}}px">•<br />7π/12</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|2*pi/3}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|2*pi/3}} round 0}}px">•<br />2π/3</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|3*pi/4}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|3*pi/4}} round 0}}px">•<br />3π/4</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|5*pi/6}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|5*pi/6}} round 0}}px">•<br />5π/6</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|11*pi/12}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|11*pi/12}} round 0}}px">•<br />11π/12</div>
<div style="position:absolute;left:{{#expr:300-200}}px;bottom:{{#expr:300}}px">•<br />π</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|13*pi/12}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|13*pi/12}} round 0}}px">•<br />13π/12</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|7*pi/6}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|7*pi/6}} round 0}}px">•<br />7π/6</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|5*pi/4}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|5*pi/4}} round 0}}px">•<br />5π/4</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|4*pi/3}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|4*pi/3}} round 0}}px">•<br />4π/3</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|17*pi/12}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|17*pi/12}} round 0}}px">•<br />17π/12</div>
<div style="position:absolute;left:{{#expr:300}}px;bottom:{{#expr:300-200}}px">•<br />3π/2</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|19*pi/12}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|19*pi/12}} round 0}}px">•<br />19π/12</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|5*pi/3}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|5*pi/3}} round 0}}px">•<br />5π/3</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|7*pi/4}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|7*pi/4}} round 0}}px">•<br />7π/4</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|11*pi/6}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|11*pi/6}} round 0}}px">•<br />11π/6</div>
<div style="position:absolute;left:{{#expr:300+200*{{User:System86/cos|23*pi/12}} round 0}}px;bottom:{{#expr:300+200*{{User:System86/Sin|23*pi/12}} round 0}}px">•<br />23π/12</div>
</div>
See also: