Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
mnfisher
Valued Contributor
Posts: 1453 http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 135 times
Been thanked: 707 times
Post
by mnfisher » Fri Nov 08, 2024 5:45 pm
Will have a play - over the weekend.
The App developer - the use supplementary code option doesn't seem to work
so can't use the previous code...
It's odd that some values are different too (1/3 for example)
Martin
mnfisher
Valued Contributor
Posts: 1453 Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 135 times
Been thanked: 707 times
Post
by mnfisher » Sat Nov 09, 2024 8:46 am
PC Developer doesn't use C code and so cannot use any supplementary code.
- There is a (disabled) check box in the build options. Maybe coming soon (and which language
)
Is it possible to call an external program?
The issue with the conversion seems to be with the high order bit of the exponent - so 1 works (00x3C00) but 2 doesn't (0x4000). I'd found some other code as well - but this mornings 'googlings' aren't working so well
Martin
Steve-Matrix
Matrix Staff
Posts: 1465 Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 204 times
Been thanked: 347 times
Post
by Steve-Matrix » Sat Nov 09, 2024 10:48 am
mnfisher wrote: ↑ Sat Nov 09, 2024 8:46 am
Is it possible to call an external program?
There is an Inbuilt Function to call external DLLs which can be used in PC Developer.
mnfisher
Valued Contributor
Posts: 1453 Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 135 times
Been thanked: 707 times
Post
by mnfisher » Sat Nov 09, 2024 4:23 pm
Okay - an app version....
I cheated (?) - I asked ChatGPT to do fp16 to fp32 in C and converted the result.
I also cheated in that I just return 0.0 for NaN, and Infinity.
But it seems to work AOK - I just used simulation to step through it and checked the value of '.r'
Martin
Attachments
fp16gpt.fcsx
(12.78 KiB) Downloaded 116 times
stefan.erni
Valued Contributor
Posts: 997 Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 190 times
Been thanked: 217 times
Post
by stefan.erni » Mon Nov 11, 2024 7:51 am
Hi Martin, Hi Steve
I have added Martin's macro to my program. It works perfectly in the App. Very good, thank you Martin.
App:
Result:
Attachments
2024-11-11_08-43-01.PNG (409.75 KiB) Viewed 4437 times
mnfisher
Valued Contributor
Posts: 1453 Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 135 times
Been thanked: 707 times
Post
by mnfisher » Mon Nov 11, 2024 9:01 am
Cool!
Should be easy to look up the bit patterns for NaN and +/- infinity and add those too for completion.
Martin