Questions tagged [math]

For questions about designing and implementing mathematical functions or operations in a programming language.

Filter by
Sorted by
Tagged with
30 votes
11 answers
19k views

Why do so many programming languages not have a "built-in" way to do simple math functions?

Note 1: My question is not about the factorial function. It's about "simple math functions" that high-school level pocket calculators can do, but most programming languages cannot do without ...
Nike Dattani's user avatar
20 votes
5 answers
4k views

Is there any particular reason to only include 3 out of the 6 trigonometry functions?

Most languages seem to only have sin cos and tan. While the other 3 are just ...
CPlus's user avatar
  • 7,891
13 votes
5 answers
674 views

Distinguishing modulo (Euclidean division) from remainder

The % operator in most programming language provide a remainder from integer division. When both operands are positive all works as expected. But when the number is ...
CPlus's user avatar
  • 7,891
6 votes
2 answers
341 views

Are there any disadvangates to requiring sincos() type functions?

sincos() is just a way to compute sin() and cos() at once, possibly at improved performance ...
CPlus's user avatar
  • 7,891