|
From: | Dmitri A. Sergatskov |
Subject: | [Octave-bug-tracker] [bug #64361] sinc() return NaN on sinc(-1:0.20:1-0.20) expression |
Date: | Wed, 28 Jun 2023 18:59:12 -0400 (EDT) |
Follow-up Comment #8, bug #64361 (project octave): So it must be some re-casting happens between x = (-1:0.2:1-0.2) and calling x(i): octave:43> x = (-1:0.2:1-0.2) x = Columns 1 through 6: -1.000000000000000 -0.800000000000000 -0.600000000000000 -0.400000000000000 -0.200000000000000 0.000000000000000 Columns 7 through 10: 0.200000000000000 0.400000000000000 0.600000000000000 0.800000000000000 octave:44> format long octave:45> x = (-1:0.2:1-0.2) x = Columns 1 through 6: -1.000000000000000 -0.800000000000000 -0.600000000000000 -0.400000000000000 -0.200000000000000 0.000000000000000 Columns 7 through 10: 0.200000000000000 0.400000000000000 0.600000000000000 0.800000000000000 octave:46> (-1:0.2:1-0.2) - x(6) ans = Columns 1 through 5: -1.000000000000000e+00 -8.000000000000000e-01 -6.000000000000000e-01 -4.000000000000000e-01 -2.000000000000000e-01 Columns 6 through 10: 5.551115123125783e-17 2.000000000000001e-01 4.000000000000001e-01 6.000000000000001e-01 8.000000000000000e-01 Dmitri. -- _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64361> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |