IRC channel logs

2022-06-25.log

back to list of logs

<lilyp>you can get the current time, both as uint and as <date>
***X-Scale` is now known as X-Scale
***X-Scale` is now known as X-Scale
<roptat>hi!
<roptat>I'm trying to use expt with some big numbers, and I get "numerical overflow"
<roptat>is there an alternative?
<sneek>wb chrislck!
<chrislck>roptat: any numeric calculation you'll use will have some limits...
<singpolyma>chrislck: why?
<singpolyma>There's no bignum library for guile?
<lilyp>there is gmp, but there are limits to ram
<singpolyma>Oh, sure, the limit is if you can't add ram fast enough I suppose. True ;)
<lilyp>for context: (expt 2 (expt 2 20)) is already quite large
<roptat>yeah I figured it out by myself ^^'
<roptat>since I wanted *modular* exponentiation anyway, I wrote a procedure to do that. Although, is there any modular exponentiation procedure in guile already? maybe I shouldn't have bothered implementing it?
<singpolyma>Probably gmp has that too? But not sure how good the bindings are
<lilyp>I'm not aware of any, but yeah, modulo_exp can be hurtful if you try the stupid way :)
<lilyp> https://gmplib.org/manual/Integer-Exponentiation
<stis>Hello guilers!
***rgherdt_ is now known as rgherdt