On 2021-09-02, 18:11, "Gilles Sadowski" <[email protected]> wrote:
WARNING - External email; exercise caution.
Le jeu. 2 sept. 2021 à 16:30, Erik Svensson <[email protected]> a
écrit :
>
> Hi!
>
>
>
> I’ve implemented profiles, where you can choose to use either
AccurateMath or jlM and it works on j8.
Can you provide a link to the code?
https://github.com/perf-coder/commons-math/tree/math-profiles-j8-am
My changes are all in org.apache.commons.math4.legacy.core
The MathProfile.java API might warrant some work.
The MathProfile static block will check for a property (currently
org.apache.commons.math.provider ) which can have JDK_MATH as optional value.
All other values will default to AM as math provider.
For java 8, the code builds just fine and works as intended. For java versions
> 8, it will not build since AM doesn't implement all methods in StrictMath (or
so the tests say anyway).
NB that the code is not release-ready. I need to add doc:s.
Cheers
Erik Svensson
> Building on later versions of the jdk fails on the
AccurateMathTest.checkMissingAccurateMathClasses test (not surprise there).
>
> I can implement the missing methods using the same algorithms as OpenJDK,
Do you mean copying (Java?) code that is maintained somewhere else?
> we can remove the test or maybe something else?
Perhaps refactor the test using assumptions.[1]
> The second alternative depends on if AccurateMath is going to keep on
being a drop-in replacement for jlM.
"FastMath" was a rewrite of the functions defined in "java.lang.Math"
as of Java 8.
Its usefulness was in the implementations being equally or more
accurate and sometimes faster (on Java 5).
As mentioned in another thread, we should know whether that's still
the case in environments where the upcoming version of CM could
potentially be used.
>
> How do you guys want to play this?
>
[1]
https://junit.org/junit5/docs/current/user-guide/#writing-tests-assumptions
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
*******************************************
CONFIDENTIALITY AND PRIVACY NOTICE: This e-mail and any attachments are for the
exclusive and confidential use of the intended recipient and may constitute
non-public information. Personal data in this email is governed by our Privacy
Policy at https://www.nasdaq.com/privacy-statement unless explicitly excluded
from it; please see the section in the policy entitled “Situations Where This
Privacy Policy Does Not Apply” for circumstances where different privacy terms
govern emailed personal data. If you received this e-mail in error,
disclosing, copying, distributing or taking any action in reliance of this
e-mail is strictly prohibited and may be unlawful. Instead, please notify us
immediately by return e-mail and promptly delete this message and its
attachments from your computer system. We do not waive any work product or
other applicable legal privilege(s) by the transmission of this message.
*******************************************