[Home] [By Thread] [By Date] [Recent Entries]
On 2011-06-19 23:08, Stefan Krause wrote:
[b&] Out of interest, why do you need to distinguish them? I think its strange that the spec requires ambiguous results of atan2 for zero-valued arguments: The expression math:atan2(+0.0e0, -0.0e0) returns 0.0e0. The expression math:atan2(+0.0e0, -0.0e0) returns math:pi(). The expression math:atan2(-0.0e0, -0.0e0) returns -0.0e0. The expression math:atan2(-0.0e0, -0.0e0) returns -math:pi(). Then atan2 is no longer a function, mathematically. If, in an attempt to disambiguate the function, the B1O results were not required, you could simply return -x*y for x=B10, y=B10. If the spec is flawed and should actually read: The expression math:atan2(+0.0e0, +0.0e0) returns 0.0e0. The expression math:atan2(+0.0e0, -0.0e0) returns -0.0e0. The expression math:atan2(-0.0e0, +0.0e0) returns math:pi(). The expression math:atan2(-0.0e0, -0.0e0) returns -math:pi(). then I donbt see another way than reverting to some tricks such as cast each argument to xs:string and look up the corresponding result. Gerrit
|

Cart



