It is currently April 19th, 2024, 5:02 pm

[Bug] inverse trigonometric functions

Report bugs with the Rainmeter application and suggest features.
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

[Bug] inverse trigonometric functions

Post by moshi »

3.2.0 beta r2318 64-bit (Sep 9 2014)
Windows 7 Home Premium 64-bit (build 7601) Service Pack 1
Path: C:\Program Files\Rainmeter\
IniFile: C:\Users\Alex\AppData\Roaming\Rainmeter\Rainmeter.ini
SkinPath: C:\Users\Alex\Documents\Rainmeter\Skins\

it seems to me the Asin and Acos functions are broken. the do not like values larger than 57.2°

Code: Select all

[Test2]
Measure=Calc
Formula=ASin(RAD(57.3))
result: -1.#IND O.O

also the results for lower values are wrong.

Code: Select all

[Test2]
Measure=Calc
Formula=ASin(RAD(45))
result: 0.90334

correct result: 1.57079
User avatar
iNjUST
Posts: 117
Joined: June 20th, 2012, 12:44 am

Re: [Bug] inverse trigonometric functions

Post by iNjUST »

The domain of ASIN(X) is -1 <= X <= 1.

RAD(57.3) = 1.00007
RAD(45) = 0.7854

ASIN(1.0007) = UNDEFINED
ASIN(0.7854) = 0.90334

Read more about Inverse Trig Function.

EDIT: And this "correct value" you mentioned (1.57079) is actually (PI/2) which is the upper range of ASIN(X) = ASIN(1). Perhaps another calculator you're using is reporting the max value for an out-of-range result rather than printing an error.
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: [Bug] inverse trigonometric functions

Post by moshi »

:oops:

oh my. thanks for the explanation. guess school ist just too long ago.