nspyre-org / nspyre

(n)etworked (s)cientific (p)ython (r)esearch (e)nvironment
BSD 3-Clause "New" or "Revised" License
23 stars 11 forks source link

Logspace Acting Up #43

Closed aidanj5 closed 3 years ago

aidanj5 commented 3 years ago

When I use a 'range' in my spyrelet, and set the range to a logspace instead of a linspace, I get some messed up values. For some reason, it adds on '1' of the base unit. So, when I make a range from 100ns to 1 us, I get 1.0000001 seconds to 1.000001 seconds in my range.

What can I change in the code to fix this behavior?

In fact, it doesn't seem like it even goes up to the correct value exactly.

image image

I am using Windows 10, nspyre version 4.5. I installed via conda-forge a while ago.

jacobfeder commented 3 years ago

Hi Aidan, I would recommend simply defining a 'start' and 'stop' parameter, then creating the logspace on your own in your code. We plan to remove this logspace function in later versions of nspyre anyway, because it is a bit buggy as you have observed.

aidanj5 commented 3 years ago

Ah, so it just doesn't work. Thank you for letting me know. I'll do it myself!