Mercurial > octave-nkf
comparison liboctave/cruft/Faddeeva/Faddeeva.cc @ 19656:200da7d24174 stable
* Faddeeva.cc: Avoid C-style cast warnings.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 23 Jan 2015 16:39:07 -0500 |
parents | 75a671fcdd73 |
children | 05e3639b0fac |
comparison
equal
deleted
inserted
replaced
19652:75a671fcdd73 | 19656:200da7d24174 |
---|---|
1010 with the help of Maple and a little shell script. This allows | 1010 with the help of Maple and a little shell script. This allows |
1011 the Chebyshev polynomials to be of significantly lower degree (about 1/4) | 1011 the Chebyshev polynomials to be of significantly lower degree (about 1/4) |
1012 compared to fitting the whole [0,1] interval with a single polynomial. */ | 1012 compared to fitting the whole [0,1] interval with a single polynomial. */ |
1013 static double erfcx_y100(double y100) | 1013 static double erfcx_y100(double y100) |
1014 { | 1014 { |
1015 switch ((int) y100) { | 1015 switch (static_cast<int> (y100)) { |
1016 case 0: { | 1016 case 0: { |
1017 double t = 2*y100 - 1; | 1017 double t = 2*y100 - 1; |
1018 return 0.70878032454106438663e-3 + (0.71234091047026302958e-3 + (0.35779077297597742384e-5 + (0.17403143962587937815e-7 + (0.81710660047307788845e-10 + (0.36885022360434957634e-12 + 0.15917038551111111111e-14 * t) * t) * t) * t) * t) * t; | 1018 return 0.70878032454106438663e-3 + (0.71234091047026302958e-3 + (0.35779077297597742384e-5 + (0.17403143962587937815e-7 + (0.81710660047307788845e-10 + (0.36885022360434957634e-12 + 0.15917038551111111111e-14 * t) * t) * t) * t) * t) * t; |
1019 } | 1019 } |
1020 case 1: { | 1020 case 1: { |
1454 for y intervals [0,0.01], [0.01,0.02], ...., [0.99,1], generated | 1454 for y intervals [0,0.01], [0.01,0.02], ...., [0.99,1], generated |
1455 with the help of Maple and a little shell script. This allows | 1455 with the help of Maple and a little shell script. This allows |
1456 the Chebyshev polynomials to be of significantly lower degree (about 1/30) | 1456 the Chebyshev polynomials to be of significantly lower degree (about 1/30) |
1457 compared to fitting the whole [0,1] interval with a single polynomial. */ | 1457 compared to fitting the whole [0,1] interval with a single polynomial. */ |
1458 static double w_im_y100(double y100, double x) { | 1458 static double w_im_y100(double y100, double x) { |
1459 switch ((int) y100) { | 1459 switch (static_cast<int> (y100)) { |
1460 case 0: { | 1460 case 0: { |
1461 double t = 2*y100 - 1; | 1461 double t = 2*y100 - 1; |
1462 return 0.28351593328822191546e-2 + (0.28494783221378400759e-2 + (0.14427470563276734183e-4 + (0.10939723080231588129e-6 + (0.92474307943275042045e-9 + (0.89128907666450075245e-11 + 0.92974121935111111110e-13 * t) * t) * t) * t) * t) * t; | 1462 return 0.28351593328822191546e-2 + (0.28494783221378400759e-2 + (0.14427470563276734183e-4 + (0.10939723080231588129e-6 + (0.92474307943275042045e-9 + (0.89128907666450075245e-11 + 0.92974121935111111110e-13 * t) * t) * t) * t) * t) * t; |
1463 } | 1463 } |
1464 case 1: { | 1464 case 1: { |