What are the names of the trigonometric functions in Scheme, and what units do they represent angles in?
-
Here you find a list of trigonometry functions, note that this is in Racket. http://docs.racket-lang.org/reference/generic-numbers.html#%28part._.Trigonometric_.Functions%29 – Kevin Oct 03 '15 at 11:51
-
@Sylwester but it's OK because they are all just LISP, and in my question I posted something that verified those functions exist in Scheme. (The link that's not SO search!) – wizzwizz4 Oct 03 '15 at 14:45
-
Function reference for Scheme [here](http://community.schemewiki.org/?lispme-language-elements), but it has no units. – wizzwizz4 Aug 12 '17 at 17:33
2 Answers
The Scheme standards define six trigonometric functions: sin
, cos
, tan
, asin
, acos
, and atan
. In particular, atan
can be called with either 1 or 2 arguments, and the 2-argument version is equivalent to atan2
in other languages.
sin
, cos
and tan
all take radian arguments. asin
, acos
, and atan
all return radian values.
All serious math libraries (for any programming language), including the one that Scheme provides, use radians for their trigonometric functions.
Mathematically, radian is the one true correct unit of measure for angles. :-) Anyway, this is why documentation usually doesn't explicitly spell this out; it is such an overwhelmingly common expectation that it's redundant, as using any other unit is a pretty serious WTF.
Racket's documentation spells this out more explicitly because it's used widely in educational settings where radian-as-fundamental-unit-of-angle-measure may not have been taught yet.

- 1
- 1

- 219,335
- 46
- 382
- 435
In the R6RS standard you have a fair amount of standard numeric procedures including sin
, cos
, tan
, asin
, acos
, and atan
.
The R6RS standard has special numeric libraries for both fixnum and floats which may be faster versions than the generic ones.
From the procedure available you may able to make other, more specialized, procedures.

- 47,942
- 4
- 47
- 79