### User Tools

====== Constant Variable PI ====== ====Value==== an //[[CL:Glossary:implementation-dependent]]// //[[CL:Glossary:long float]]//. ====Description==== The best //[[CL:Glossary:long float]]// approximation to the mathematical constant ''π''. ====Examples==== In each of the following computations, the precision depends on the //[[CL:Glossary:implementation]]//. Also, if //[[CL:Glossary:long float]]// is treated by the //[[CL:Glossary:implementation]]// as equivalent to some other //[[CL:Glossary:float]]// format (e.g., //[[CL:Glossary:double float]]//) the exponent marker might be the marker for that equivalent (e.g., ''D'' instead of ''L''). <blockquote> pi <r>3.141592653589793L0 </r> ([[CL:Functions:cos]] pi) <r>-1.0L0</r> ([[CL:Macros:defun]] sin-of-degrees (degrees) ([[CL:Special Operators:let]] ((x ([[CL:Special Operators:if]] ([[CL:Functions:floatp]] degrees) degrees ([[CL:Functions:float]] degrees pi)))) ([[CL:Functions:sin]] ([[CL:Functions:math-multiply*]] x ([[CL:Functions:math-divide|/]] ([[CL:Functions:float]] pi x) 180))))) [[CL:Functions:SIN-OF-DEGREES]] </blockquote> ====See Also==== None. ====Notes==== An approximation to ''π'' in some other precision can be obtained by writing ''([[CL:Functions:float]] pi x)'', where ''x'' is a //[[CL:Glossary:float]]// of the desired precision, or by writing ''(coerce pi //type//)'', where //type// is the desired type, such as **[[CL:Types:short-float]]**.

### Page Tools 