IRC channel logs
2024-06-26.log
back to list of logs
<fantazo>hmm, I have noticed that there is no type for 'exact' money values in guile. if I'm reading the documentation correctly, then any floating point value is represented as a double. And only integers can grow arbitrarily without losing accuracy. <mwnaylor>In general, I you want total accuracy, stick to intergers and rationals. Only convert to floating upon display. <cpli>can you have complex rationals? <mwnaylor>May take longer to compute, but I've grown to respect the rationals in Common Lisp, Scheme, and Clojure. <dthompson>cpli: no the real and imaginary parts of complex numbers are floats <cpli>should it stay that way? <cpli>i'm with mwnaylor when it comes to "stick to integers and rationals", but if that means i'll have to literally stick with open fields it makes me sad <cpli>complex numbers is *the* algebraically closed field <dthompson>seems like "field" is a math term I just don't know <cpli>(uhh.. if we ignore fields of characteristic n, and p-adic "fields") <dthompson>I don't ever use complex numbers so I don't know why they use floats. presumably there's a good reason. <cpli>complex multiplication is bothersome; i.e.: (a+bi)(c+di) => ac+adi+bci-bd <dthompson>yeah it's annoying... had to implement it awhile back <cpli>actually, we already store multiple numbers in ratios though <cpli>and it's not as though rational multiplication doesn't involve taking gcds.. <cpli>i genuinely think there might just not be much demand for it <dthompson>and we followed that same implementation in hoot <cpli>i mean that genuinely q-q; i wouldn't be able to stop myself from loosing time to figuring out if there's some nice way to implement exact sqrts <cpli>the answer is (theoretically) yes, but (practically) no <mwette>many fields of engineering (e.g., electronics, control systems, optics) use complex numbers; e.g., taking the magnitue of a rational function (Laplace transform) evaluated along the imaginary axis <rlb>apteryx: I'm planning to package 3.0.10 for debian first. But ping me in a while if I forget -- i.e. I'll look back at that cond-expand patch, and if it still seems fine, I'll probably merge it. <mwette>rlb: Does debian use `--diable-tmpnam' arg to configure? <cpli>mwette: and so is fourier, but calculating an exact ft is an action on a continuous space, and calculating an exact dft defeats the point of it being used for all the applications fft is used for. <lechner>Hi, when does Guile print "guile: warning: failed to install locale", please? <lechner>cpli / thanks! i'm using Guile via the Tortoise (C) interface. No main, and no REPL. Can either ones of those code references apply? <lechner>Hi, does Guile offer interfaces to the getrlimit/setrlimit system calls? <lechner>nvm, i found it. not sure it's in the manual