[ 
https://issues.apache.org/jira/browse/MATH-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15248891#comment-15248891
 ] 

Gilles commented on MATH-1290:
------------------------------

bq. I don't agree that anything has changed, the Math.ulp will just cast the 1 
to 1.0 or 1.0f

{noformat}
Math.ulp(1.0) != Math.ulp(1.0f)
{noformat}

The former is {{2.220446049250313E-16}} and the latter is 
{{1.1920928955078125E-7}}.

And
{noformat}
Math.ulp(1) == Math.ulp(1.0f)
{noformat}

When testing the conversion between {{Complex}} and {{double[]}}, you don't 
want to not notice a loss of 9 orders of magnitude.

Actually, the tolerances should probably be set to 0 (zero) since there is no 
computation involved, just reading a field and writing it back into an array 
and the other way around.


> Additions to Complex Utils; creation of conversion methods between Complex[], 
> double[], float[], and interleaved arrays
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: MATH-1290
>                 URL: https://issues.apache.org/jira/browse/MATH-1290
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.5
>            Reporter: Eric Barnhill
>            Priority: Minor
>              Labels: newbie, patch
>             Fix For: 4.0
>
>         Attachments: ComplexUtils.java, ComplexUtils.java, ComplexUtils.java, 
> ComplexUtils.java, ComplexUtilsTest.java, ComplexUtilsTest.java, 
> ComplexUtilsTest.java, ComplexUtilsTest.java, LaguerreSolver.java
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I propose to add several new methods to the ComplexUtils class enabling easy 
> conversion between Complex[] arrays, real or imaginary double[] or float[] 
> arrays, and interleaved complex double[] or float[] arrays. The last two in 
> particular are beneficial to have for OpenCL implementations and the 
> JTransforms library.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to