Re: [Numpy-discussion] improving arange()? introducing fma()?

2018-02-27 Thread Arnaldo Russo
Hi there,

Is this the implementation of fma?
https://github.com/nschloe/pyfma

Cheers,
Arnaldo

   .
   |\
 _/]_\_
~"~^~

Arnaldo D'Amaral Pereira Granja Russo
c i c l o t u x . o r g

2018-02-25 8:34 GMT-03:00 Nils Becker :

> Hey,
>
>
>> Anyone that understands FP better than I do:
>>
>> In the above code, you are multiplying the step by an integer -- is there
>> any precision loss when you do that??
>>
>>
> Elementary operations (add, sub, mul, div) are demanded to be correctly
> rounded (cr) by IEEE, i.e. accurate within +/- 0.5 ulp. Consequently, a cr
> multiplication followed by a cr addition will be accurate within +/-1 ulp.
> This is also true if the first multiplicand is an integer.
> Using FMA will reduce this to +/- 0.5 ulp. This increase in accuracy of
> the grid calculation should not be relevant - but it also does not hurt.
>
> Still I would suggest adding the FMA operation to numpy, e.g. np.fma(a, b,
> c). There are several places in numpy that could benefit from the increased
> accuracy, e.g. evaluation of polynomials using Horner's method. In cases
> like this due to iteration and consequent error propagation the accuracy
> benefit of using FMA can be far larger. There may also be a performance
> benefit on platforms that implement FMA in hardware (although I am not sure
> about that).
>
> Cheers
> Nils
>
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@python.org
> https://mail.python.org/mailman/listinfo/numpy-discussion
>
>
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] PyPy nditer context managers

2018-02-27 Thread xoviat
The Pull Request related nditer has been dormant for a while, and there seems 
to be no consensus on moving forward at this point. Charles, are you opposed to 
requiring the .close() call on nditer and/or adding context managers? If so, 
then we might as well let mattip know that the Pull Request is not moving 
forward.

If you aren’t opposed, perhaps we should clarify what the expectations for the 
Pull Request are and a path to having it merged.
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion