2024/05/10

Newest at the top

2024-05-10 23:47:11 +0200 <talismanick> makes sense
2024-05-10 23:47:05 +0200 <talismanick> ah, so the jump from fib 16 -> 987 to fib 17 -> 1597 is just where it begins to overflow
2024-05-10 23:46:33 +0200 <lambdabot> (8.98846567431158e307,Infinity)
2024-05-10 23:46:32 +0200 <monochrom> > (encodeFloat 1 1023 :: Double, encodeFloat 1 1024 :: Double)
2024-05-10 23:45:39 +0200 <monochrom> Basically the max finite Double is around 2^1023.
2024-05-10 23:44:31 +0200qqq(~qqq@92.43.167.61) (Remote host closed the connection)
2024-05-10 23:43:48 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-05-10 23:42:43 +0200 <lambdabot> GT
2024-05-10 23:42:42 +0200 <int-e> > (1/0) `compare` (0/0)
2024-05-10 23:42:35 +0200 <lambdabot> • In the first argument of ‘(/)’, namely ‘1’
2024-05-10 23:42:35 +0200 <lambdabot> • No instance for (Num Ordering) arising from the literal ‘1’
2024-05-10 23:42:35 +0200 <lambdabot> error:
2024-05-10 23:42:33 +0200 <int-e> > 1/0 `compare` 0/0
2024-05-10 23:42:14 +0200 <monochrom> I normally use the docs that come with GHC instead of the web.
2024-05-10 23:41:57 +0200 <lambdabot> False
2024-05-10 23:41:55 +0200 <mauke> > 1/0 > 0/0
2024-05-10 23:41:45 +0200 <talismanick> but it is there...
2024-05-10 23:41:38 +0200 <talismanick> unfortunately, Hackage doesn't have a page for it
2024-05-10 23:41:29 +0200 <monochrom> Oh fun.
2024-05-10 23:41:21 +0200 <lambdabot> • In the expression: maxBound :: Double
2024-05-10 23:41:21 +0200 <lambdabot> • No instance for (Bounded Double) arising from a use of ‘maxBound’
2024-05-10 23:41:21 +0200 <lambdabot> error:
2024-05-10 23:41:19 +0200 <monochrom> > maxBound :: Double
2024-05-10 23:40:30 +0200 <monochrom> GHC.Num.Integer may be more future proof.
2024-05-10 23:40:05 +0200 <EvanR> snazzy
2024-05-10 23:38:34 +0200 <talismanick> `(\n -> I# (integerLog2# n))`
2024-05-10 23:38:24 +0200 <talismanick> the SO answer fixed it, yeah
2024-05-10 23:38:18 +0200 <monochrom> But GHC.Integer.Logarithms has something.
2024-05-10 23:38:15 +0200mikess(~mikess@user/mikess) (Ping timeout: 256 seconds)
2024-05-10 23:37:28 +0200 <monochrom> Ah damn Data.Bits doesn't have something to count digits. Well, at least you know how to repeatedly divided by 10 or something.
2024-05-10 23:36:05 +0200philopsos(~caecilius@user/philopsos)
2024-05-10 23:35:20 +0200 <talismanick> apparently it is the outermost `fromInteger` which is to blame
2024-05-10 23:34:53 +0200 <talismanick> https://stackoverflow.com/questions/26416323/function-to-calculate-log-of-integer
2024-05-10 23:34:52 +0200 <talismanick> ah, you're right
2024-05-10 23:33:33 +0200 <monochrom> Integer surely enjoys the functions from Data.Bits, one of which can tell you about # of digits, no?
2024-05-10 23:32:58 +0200 <monochrom> Please don't go through Double (which logBase does) when counting digits of numbers that are going to be out of range of Double.
2024-05-10 23:26:59 +0200titibandit(~titibandi@user/titibandit) (Ping timeout: 252 seconds)
2024-05-10 23:26:59 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 264 seconds)
2024-05-10 23:23:46 +0200 <EvanR> Integer is correct, look for problem elsewhere
2024-05-10 23:23:03 +0200 <talismanick> by the time it exits the call to `naive` (naive FRACTRAN interpreter), it should have shrunk to the correct size
2024-05-10 23:22:40 +0200 <talismanick> I thought that was the call you meant, because that's where it generates large numbers
2024-05-10 23:22:11 +0200 <talismanick> https://0x0.st/X80c.txt
2024-05-10 23:21:49 +0200ystael(~ystael@user/ystael) (Ping timeout: 256 seconds)
2024-05-10 23:21:43 +0200 <talismanick> (see the paste I posted earlier, I thought that was the `fromInteger` call you meant)
2024-05-10 23:21:40 +0200 <davean> talismanick: check that?
2024-05-10 23:21:20 +0200 <talismanick> the outer one just converts it to Float so logBase stops complaining
2024-05-10 23:20:59 +0200 <glguy> o.O
2024-05-10 23:20:57 +0200 <lambdabot> arising from a use of ‘logBase’
2024-05-10 23:20:57 +0200 <lambdabot> • No instance for (Floating Rational)
2024-05-10 23:20:57 +0200 <lambdabot> error: