modular arithmetics for big numbers

12 views
Skip to first unread message

Pawel Jakubas

unread,
Jan 12, 2026, 4:26:18 AM (4 days ago) Jan 12
to forum
hi J enthusiasts,

I have been trying recently https://code.jsoftware.com/wiki/Vocabulary/mdot and it seems it does not work for big numbers. Any plans to support that in the future?
Or there is a way to use it with arbitrary big integer and I am missing something?

Thanks and cheers,
Pawel

Pascal Jasmin

unread,
Jan 12, 2026, 8:28:37 AM (4 days ago) Jan 12
to fo...@jsoftware.com
0 + m.4234823749283749283749283742938742x (7 8 9 1283127398127391387123123x)

7 8 9 1283127398127391387123123

is there a different issue?
To unsubscribe from this group and stop receiving emails from it, send an email to forum+un...@jsoftware.com.

Clifford Reiter

unread,
Jan 12, 2026, 8:28:40 AM (4 days ago) Jan 12
to fo...@jsoftware.com
I suspect you are using floating type.
You can use extended integers if your integers are biggish.

_1+2^20

1.04858e6

datatype _1+2^20

floating

]M=:_1+2^20x

1048575

datatype M

extended

]X=:_1+2^21x

2097151

]Y=:_1+2^24x

16777215

X * m. M Y

15

M|X * Y

15

If you are having problems using m. with extended integers, please share an example.





Pawel Jakubas

unread,
Jan 13, 2026, 5:03:10 AM (3 days ago) Jan 13
to forum
thanks!

indeed, floating type number sneaked in in one place. 

cheers,
Pawel 

Reply all
Reply to author
Forward
0 new messages