Trigonometric/transcendental function accuracy

General discussion about calculators, SwissMicros or otherwise
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: Trigonometric/transcendental function accuracy

Post by Walter »

You don't get the point, I'm afraid. Radians are a unit containing the natural constant pi. Like other math items, such a constant can often be drawn out of parentheses (maybe not the proper term in English), easing further solution. Progressing to something like multiples of pi may help considerably in this matter if applicable. Nothing about like or not, simply trying to tackle an obvious problem for which no other method was proposed here so far IIRC. But I'm just a dumb old physicist, no mathematician.
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
User avatar
pauli
Posts: 252
Joined: Tue May 02, 2017 10:11 am
Location: Australia

Re: Trigonometric/transcendental function accuracy

Post by pauli »

I completely get the point. I also see zero merit in the "turns" unit. I mentioned thus when you first introduced it to 43S.
Radians are complete natural, all other angle units aren't.
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: Trigonometric/transcendental function accuracy

Post by Walter »

Radians write 2 pi as a real number (as well as its fractions and multiples), nothing more, nothing less. I'd leave it to wiser people to decide what's more natural.
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
Helix
Posts: 31
Joined: Sat Jun 24, 2017 12:59 am
Location: France

Re: Trigonometric/transcendental function accuracy

Post by Helix »

pauli wrote:
Sat Jun 10, 2023 7:22 am
Rational approximations seem to be commoner in my experience than polynomial ones.
Indeed, I should have written: the best polynomial approximation is the minimax approximation.
I don’t know which methods are used in common math libraries. But I highly doubt they use Taylor series, as the article pointed by dm391 suggests.
User avatar
Jaymos
Posts: 1635
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

Re: Trigonometric/transcendental function accuracy

Post by Jaymos »

Walter wrote:
Sat Jun 10, 2023 12:14 pm
Radians write 2 pi as a real number (as well as its fractions and multiples), nothing more, nothing less. I'd leave it to wiser people to decide what's more natural.
Wise or otherwise, natural or not, I removed MULπ from the Angular Display Mode setting of the C47 probably 2 years ago. I don’t like it taking up a prime spot in the Mode menu. We provide a tagged angle conversion to MULπ though. The ADM comprises D, R & G only with no other options, which is already 50% too many for most.

I prefer e^iθ=cos(θ)+isin(θ) in radians to a strange measure of half-revolutions in the form e^i(θ/π)=cos(θ/π)+isin(θ/π) with θ in MULπ. I suppose everyone to his own liking and MULπ can still be found if you look in CAT.
Jaco Mostert
Elec Eng, South Africa
https://47calc.com C47 (s/n 03818 & 06199), WP43 (0015). In box: HP42S, HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; ex: FX702P, 11C, HP67 & HP85; iOS: 42s Byron, Free42+, WP31S/34S, HCalc.
chris185
Posts: 31
Joined: Tue May 23, 2023 11:59 am

Re: Trigonometric/transcendental function accuracy

Post by chris185 »

Has anyone here ever used gradians? Or even know anyone who’s used them? :-)
Bill K. - USA
Posts: 157
Joined: Fri Apr 29, 2022 7:49 pm

Re: Trigonometric/transcendental function accuracy

Post by Bill K. - USA »

chris185 wrote:
Sat Jun 10, 2023 8:20 pm
Has anyone here ever used gradians? Or even know anyone who’s used them? :-)
The Civil Engineering students at my first college were always running around surveying the entire campus, and they used gradians--they're the only ones I've ever seen use it.

IMO Radians are the most natural angular unit, an angle of 1 radian producing an arc equal in length to the radius. And it's very helpful that x approximates sin x for small x. In physics, we rarely used anything but radians (only using degrees when doing physical experiments and using a protractor). I like that MULpi is still an option on the C47.
User avatar
pauli
Posts: 252
Joined: Tue May 02, 2017 10:11 am
Location: Australia

Re: Trigonometric/transcendental function accuracy

Post by pauli »

Helix wrote:
Sat Jun 10, 2023 3:46 pm
I don’t know which methods are used in common math libraries. But I highly doubt they use Taylor series, as the article pointed by dm391 suggests.
They use just about everything. Whatever gives the best result cheaply. So yes, Taylor series in some cases. Also polynomial and rational approximations. And more. Functions are often approximated piecewise and the approach can change per piece.
Nigel (UK)
Posts: 118
Joined: Fri Jul 21, 2017 11:08 pm

Re: Trigonometric/transcendental function accuracy

Post by Nigel (UK) »

I've been meaning to ask this question for years, but somehow I've never got around to doing so. Here goes:

The WP34S and WP4x calculators all take great care to calculate trig functions correctly over the full range of real numbers that each calculator supports. (This is particularly challenging when angles are measured in radians.) My question is simple: why bother?

It seems to me that giving an exact answer for the trig function of a number of the form (number between 1 and 10 with N significant digits of precision) x 10^(M), where (for the case of radians) M is greater than N, is a bit like giving an exact answer to the question: "The KT extinction happened 65 million years ago: which day of the week was this?". If your number lacks the precision to express any fraction of a turn, surely you have no business asking for its sine, cosine, or tangent and expecting a sensible reply.

The manual for the TI58/59 calculators talks about precision of trig functions decreasing by one digit for each power of ten increase, until for large enough angles no partial rotation is recognised. This seems sensible. If you ask for sin(1.414x10^18) in single precision, who could complain if the calculator returned an error, or (better?) a NaN?

Clearly the writers of the firmware disagree with this point of view, but I'm curious as to the reasons for this.

Nigel (UK)
DA74254
Posts: 193
Joined: Tue Oct 03, 2017 11:20 pm
Location: Norway/Latvia

Re: Trigonometric/transcendental function accuracy

Post by DA74254 »

Well, some people like things/numbers/answers to be very exact.
Do we need it?
No!
Matt Parker (i think it was) have a YT vid about how many decimals of Pi we need.
He calculated the earth orbit around the sun (some 950million km) with 15 and 16 decimal places of Pi. The result? Discrepancy of about 3 millimetres! On the earth orbit!
Esben
DM42 SN: 00245, WP43 Pilot SN:00002, DM32 SN: 00045 (Listed in obtained order).
Post Reply