Skip to main content

Questions tagged [math]

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

Filter by
Sorted by
Tagged with
31 votes
11 answers

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

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
  • 8,301
13 votes
5 answers

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
  • 8,301
6 votes
2 answers

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
  • 8,301