我不知道我做错了什么。
from math import *
# triangle Law of Sines test:
a = float(3)
b = float(3)
c = 4.24264
A = float(45)
B = float(45)
C = float(90)
# it should be equal to the diameter of the triangle's
# ...circumcircle when convert radians to degrees (2.12132) :
print a /sin(A)
print c /sin(C)
# and just test angles :
print degrees( sin( float(45) ) ) # 'SHOULD BE 2.8284'
print degrees( sin( float(90) ) ) # 'SHOULD BE 1'
...以及打印输出:
>> 3.52566408941
>> 4.74570003753
>> 48.7531807286
>> 51.2222357231
最佳答案
关于Python 数学模块显示完全错误的结果?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32495683/