Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

highbit #52

Open
Jos-Ven opened this issue Aug 22, 2019 · 6 comments
Open

highbit #52

Jos-Ven opened this issue Aug 22, 2019 · 6 comments

Comments

@Jos-Ven
Copy link

Jos-Ven commented Aug 22, 2019

Hi,
At I am still quite happy with your Punyforth. Great work!
There is just 1 question for a primitive floating-point pack.

When highbit is defined as:
-1 1 rshift invert constant: highbit
than highbit returns 214748364
Other 32 bits systems return 2147483648
How should highbit be defined?
Thanks in advance.

Despite that problem the pack seem to work as you can see:

(stack) 10 s>f 3 s>f f/ f.
333333333e-8(stack)
10 s>f 6 s>f f/ f.
1666666666e-9(stack)

Kind regards, Jos

@klapauciusisgreat
Copy link

klapauciusisgreat commented May 24, 2020

I'm curious which floating point packs are freely available. Jos, can you point so something interesting ?

I'd like to get a at least double precision library going for a project doing some astronomical toy (say, point antenna at moon) and most code for that does not really work with single precision.

Also, am I right at suspecting that a 'proper' floating point implementation requires to change the interpreter to recognize FP numbers ? It seems feasible but seems like a fairly decent chunk of work, especially when FP speed is not of the essence (e.g. Moon angular speed relative to earth is not that fast).

My other option, micropython (on esp32), is also handicapped in the precision department.

@Jos-Ven
Copy link
Author

Jos-Ven commented May 25, 2020 via email

@klapauciusisgreat
Copy link

klapauciusisgreat commented May 25, 2020 via email

@Jos-Ven
Copy link
Author

Jos-Ven commented May 26, 2020 via email

@klapauciusisgreat
Copy link

klapauciusisgreat commented May 27, 2020 via email

@Jos-Ven
Copy link
Author

Jos-Ven commented May 28, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants