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

computation idioms (+/!.0) and (+/@:*"1!.0) throw NaN error #184

Closed
jip opened this issue Feb 22, 2024 · 2 comments
Closed

computation idioms (+/!.0) and (+/@:*"1!.0) throw NaN error #184

jip opened this issue Feb 22, 2024 · 2 comments

Comments

@jip
Copy link

jip commented Feb 22, 2024

   JVERSION
Engine: j9.6.0-beta1/j64/linux
Build: commercial/2023-12-27T20:27:14/clang-11-0-0/SLEEF=1
Library: 9.6.1
Qt IDE: 2.5.2/5.12.8(5.15.8)
OS Ver: openSUSE Leap 15.5 5.14.21-150500.55.49-default
Platform: Linux 64
Installer: j9.6 install
InstallPath: /home/user/j9.6.0-beta1_j64avx2
Contact: www.jsoftware.com
   
   FP_OVFL=. (2 - 2^_52) * 2 ^ 1023  NB. max normalized positive number
   2 (3!:3) FP_OVFL
e200000000000000
0000000000000008
0000000000000001
0000000000000000
7fefffffffffffff
   
   1 0 (+/@:*) 0 , FP_OVFL  NB. inner product with floating precision
0
   1 0 (+/@:*"1!.0) 0 , FP_OVFL  NB. inner product with floating16 precision
|NaN error, executing dyad +/@:*"1
|you have calculated the equivalent of _-_ or _%_
|   1 0    (+/@:*"1!.0)0,FP_OVFL

I've expected the last sentence succeed just like its predecessor.

@jip jip changed the title a computation idiom (+/@:*"1!.0) throws NaN error a computation idioms (+/!.0) and (+/@:*"1!.0) throw NaN error Feb 27, 2024
@jip
Copy link
Author

jip commented Feb 27, 2024

One more example:

   (+/!.0) _ 0
_
   (+/!.0) _ 0 _
|NaN error, executing monad +/
|you have calculated the equivalent of _-_ or _%_
|       (+/!.0)_ 0 _

@jip jip changed the title a computation idioms (+/!.0) and (+/@:*"1!.0) throw NaN error computation idioms (+/!.0) and (+/@:*"1!.0) throw NaN error Feb 27, 2024
@LdBeth
Copy link

LdBeth commented Jun 30, 2024

They use fundamentally different algorithms so it is really not a surprise when their behavior does not match

@bilam bilam closed this as completed Aug 4, 2024
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

3 participants