octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #64361] sinc() return NaN on sinc(-1:0.20:1-0.


From: Rik
Subject: [Octave-bug-tracker] [bug #64361] sinc() return NaN on sinc(-1:0.20:1-0.20) expression
Date: Thu, 29 Jun 2023 16:57:39 -0400 (EDT)

Follow-up Comment #30, bug #64361 (project octave):

Using __attribute__ ((target ("no-avx"))) does work.

Interestingly, it does so not by making the outcome of array_value() equal to
an exact zero for element 6, but instead by having the test "x != 0" return
false for the sixth element.  This removes it from consideration in the sinc
function.

But, there is still a difference between the access functions in Range.h as
this code shows

octave:2> [x](6)
ans = 5.551115123125783e-17
octave:3> x(6)
ans = 0
octave:4> x != 0
ans =

  1  1  1  1  1  0  1  1  1  1



So, using attributes would narrowly fix this particular bug report, but would
not, it seems, have full consistency between the two approaches.

This does seem like an annoying processor-specific bug.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64361>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]