0

I find little things like this throughout the C programming language; something that is very easy to provide, has very little chance of breaking old code, and has an obvious way to standardize it. Is minimalism the reason?

Kevin Reid
  • 37,492
  • 13
  • 80
  • 108
Jeff Linahan
  • 3,775
  • 5
  • 37
  • 56

2 Answers2

5

Because they're trivial to compute if you have the "standard" trig functions?

Oliver Charlesworth
  • 267,707
  • 33
  • 569
  • 680
4

By reciprocal, do you mean the arc functions? They're defined as asin(), acos() and atan() (and atan2())

If you mean 1/cos(), 1/sin() and 1/tan(), implementing these functions is a trivial exercise, but dealing with error checking (sin() != 0, etc. etc.) is far more effort than it's worth for a major library.

Ben Stott
  • 2,218
  • 17
  • 23
  • Error checking is irrelevant. Library code routinely performs error checking. If what you say is true, why do libraries implement inverse trig for example? – David Heffernan Apr 09 '11 at 14:34