- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前正在尝试让一些涉及三角函数的东西运行,但我遇到了一个涉及 math.asin 函数的故障(它也适用于 acos 和 atan,但在那些情况下,它对我正在尝试的影响较小做)。我在其他地方找到的帮助线程中的两篇帖子对这个问题进行了最好的总结;
Sorry, I have just tried it again and found that
a = sin(2)
b = asin(a)
b doesnt = 2but
a = cos(2)
b = acos(a)
b DOES= 2Because y = sin(x) is a repetitive function, there is more than one value of x for every value of y. ie sin(2) = sin(1.14) = 0.909
Therefore, when you do x = asin(y), you will only ever get a value between -PI/2 <= x <= PI/2
我从数学上理解这是为什么,但我想知道是否有人可以帮助我找到一个范围内的所有解决方案,而不仅仅是它自动给出的解决方案。谢谢 =]
最佳答案
让我们考虑范围 [0, 2π]。
对于 acos
,每个值 x 在 2π - x 处还有另一个可能的值。 (想象一下余弦图,您就会看到它。)
对于 asin
,每个正值 x 在 π - x 处都有另一个可能的值;每个负值在 3π - x 处都有一个可能的值。
请随意绘制更多图表以推广到更大的范围。 :-)
关于floating-point - python 反三角函数(特别是 arcsin),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/782418/
我已经可以在其中输入一些附加文本了mydomain/wiki/Special:UserLogin。我添加了一句话: In order to apply for an account send an m
有人可以解释以下脚本输出背后的逻辑吗? import numpy if(numpy.dtype(numpy.float64) == None): print "Surprise!!!!" 谢谢
是我还是 gmail bulls**t?在 outlook/浏览器上,我的电子邮件是完美的,但在 gmail 上,2 个表之间有一个空间,为什么?!?图片:http://i.imgur.com/srJ
我是一名优秀的程序员,十分优秀!