Ask Your Question
-1

is this a bug?

asked 2024-05-20 23:13:39 +0100

beeson gravatar image

updated 2024-05-27 11:50:45 +0100

FrédéricC gravatar image

The code:

sage: a
3
sage: b
8
sage: c
7
sage: t = (a*a + b*b - c*c)/(2.0 *a*b)
sage: acos(t)
1.04719755119660
sage: N(acos(t)/pi)
0.333333333333333
sage: gamma = acos(t)
sage: N(gamma/pi)
0.333333333333333
sage: gamma = acos ((a*a + b+b - c*c)/(2.0 *a*b))
sage: N(gamma/pi)
0.666666666666667
sage: version()
'SageMath version 10.0, Release Date: 2023-05-20'
edit retag flag offensive close merge delete

Comments

I did not manage to make it show up as code, sorry, but it is code.

beeson gravatar imagebeeson ( 2024-05-20 23:23:14 +0100 )edit

the gamma angle of a (3,8,7) triangle is pi/3, not 2pi/3; Sage will give both answers.

beeson gravatar imagebeeson ( 2024-05-20 23:24:09 +0100 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2024-05-20 23:19:42 +0100

rburing gravatar image

No it is not, in the second instance you wrote b+b instead of b*b, which is not the same thing when b=8.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2024-05-20 23:13:39 +0100

Seen: 309 times

Last updated: May 20