srowen commented on issue #25279: [SPARK-28519][SQL] Use StrictMath log, pow 
functions for platform independence
URL: https://github.com/apache/spark/pull/25279#issuecomment-519726687
 
 
   Yeah this is great info. I understand that java.lang.Math is allowed to 
return slightly different results from what some IEEE standard dictates but 
there is a most-correct answer in double precision, and these assembly code 
implementations in the x86 JVM seem to be clearly less correct for non-corner 
cases like log(3). That surprises me. There's a thread forwarded to dev@ with 
some additional info.
   
   Anyway, I think it's a good move to make the actual log() function in SQL 
return values that are consistent platform and consistent with StrictMath, even 
if that doesn't mean we need to use StrictMath for every log call internally 
(for many usages in MLlib won't matter at all). And because there is basically 
no meaningful performance change.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to