Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,801,488 events total
2025-12-12 21:02:59 <lambdabot> "1.23"
2025-12-12 21:03:02 <Lycurgus> *fun
2025-12-12 21:03:14 <EvanR> yes Nothing seems to evoke the blessed algorithm
2025-12-12 21:03:45 <monochrom> > showFFloat (Just 100) 0 ""
2025-12-12 21:03:46 <lambdabot> "0.0000000000000000000000000000000000000000000000000000000000000000000000000...
2025-12-12 21:03:51 <EvanR> which is fine but it takes Just something for seemingly a reason
2025-12-12 21:04:49 <monochrom> So I think the author just decided that if you have "Just n" then it unconditionally ensures n digits.
2025-12-12 21:05:01 <EvanR> maybe if you ask for over 17 significant digits it just slaps 0 on the rest
2025-12-12 21:05:04 <monochrom> Even if you're just printing 0.
2025-12-12 21:05:16 <EvanR> I know
2025-12-12 21:05:28 <EvanR> but in the case of 1.23 it's not the correct digits
2025-12-12 21:05:53 <EvanR> (1.229999999999999982236431605997495353221893310546875)
2025-12-12 21:06:15 <monochrom> Oh! Now I see what you mean.
2025-12-12 21:09:42 <monochrom> > length "1.2299999999999999"
2025-12-12 21:09:43 <lambdabot> 18
2025-12-12 21:11:05 <EvanR> basically it's taking the liberty of rounding up
2025-12-12 21:11:07 <EvanR> in this case
2025-12-12 21:11:16 <EvanR> not really, I'm sure, but that's the effect
2025-12-12 21:12:12 <monochrom> let s = "1.22999999999999999" in (length s, read s :: Double)
2025-12-12 21:12:16 <monochrom> > let s = "1.22999999999999999" in (length s, read s :: Double)
2025-12-12 21:12:17 <lambdabot> (19,1.23)
2025-12-12 21:12:36 <EvanR> leading me to the conclusion that: truncating "the string" of a positive float is not the same as rounding down
2025-12-12 21:12:50 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-12-12 21:12:55 <EvanR> which I was trying to demonstrate for reasons
2025-12-12 21:13:09 <monochrom> I think it's because at the limited precision of 18 digits, the thing is indistinguishable from 1.23
2025-12-12 21:13:28 <EvanR> yes, 1.23
2025-12-12 21:13:57 <EvanR> but not 1.23 plus 100 zeros
2025-12-12 21:14:21 × trickard quits (~trickard@cpe-83-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-12-12 21:14:34 trickard_ joins (~trickard@cpe-83-98-47-163.wireline.com.au)
2025-12-12 21:16:46 × Lycurgus quits (~juan@user/Lycurgus) (Quit: alsoknownas.renjuan.org ( juan@acm.org ))
2025-12-12 21:19:45 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-12-12 21:26:27 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-12-12 21:31:49 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-12-12 21:36:37 × peterbecich quits (~Thunderbi@71.84.33.135) (Ping timeout: 264 seconds)
2025-12-12 21:40:49 × jmcantrell_ quits (~weechat@user/jmcantrell) (Ping timeout: 264 seconds)
2025-12-12 21:42:14 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-12-12 21:44:50 × michalz quits (~michalz@185.246.207.201) (Remote host closed the connection)
2025-12-12 21:46:27 pavonia joins (~user@user/siracusa)
2025-12-12 21:47:07 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-12-12 21:54:08 × bggd quits (~bgg@user/bggd) (Remote host closed the connection)
2025-12-12 21:58:02 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-12-12 22:02:55 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-12 22:08:39 acidjnk joins (~acidjnk@p200300d6e7171903602e983dc1ab5a13.dip0.t-ipconnect.de)
2025-12-12 22:08:48 peterbecich joins (~Thunderbi@71.84.33.135)
2025-12-12 22:10:11 spew joins (~spew@user/spew)
2025-12-12 22:13:58 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-12-12 22:19:13 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-12-12 22:20:12 × spew quits (~spew@user/spew) (Quit: WeeChat 4.7.2)
2025-12-12 22:29:47 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-12-12 22:34:14 <sindu> /quit
2025-12-12 22:34:23 × sindu quits (~sindu@2.148.32.207.tmi.telenormobil.no) (Quit: WeeChat 4.7.1)
2025-12-12 22:34:35 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-12 22:37:27 × tromp quits (~textual@2001:1c00:3487:1b00:dd4:56d:fd02:60e2) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-12-12 22:44:48 <mauke> > 1.229999999999999982236431605997495353221893310546875 == 1.23
2025-12-12 22:44:49 <lambdabot> True
2025-12-12 22:45:05 <mauke> can't show what's not there
2025-12-12 22:45:32 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-12-12 22:46:20 ephemient joins (uid407513@user/ephemient)
2025-12-12 22:51:07 <EvanR> 1.23 is showing plenty that is "not there"
2025-12-12 22:51:50 tromp joins (~textual@2001:1c00:3487:1b00:dd4:56d:fd02:60e2)
2025-12-12 22:52:07 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-12 22:59:53 <int-e> EvanR: Have you asked this previously? The topic certainly sounds familiar. I traces back to everybody using https://gitlab.haskell.org/ghc/ghc/-/blob/master/libraries/ghc-internal/src/GHC/Internal/Float.hs?ref_type=heads#L1121-1209 (even text-show has a copy of that function) for printing floating point values and for 1.23 that returns ([1,2,3],1)
2025-12-12 23:02:44 <EvanR> it does sound familiar
2025-12-12 23:03:26 <EvanR> > showFFloat (Just 0) 1.23 ""
2025-12-12 23:03:27 <lambdabot> "1"
2025-12-12 23:03:30 <EvanR> > showFFloat (Just 1) 1.23 ""
2025-12-12 23:03:32 <lambdabot> "1.2"
2025-12-12 23:03:36 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-12-12 23:03:37 <EvanR> > showFFloat (Just 2) 1.23 ""
2025-12-12 23:03:38 <lambdabot> "1.23"
2025-12-12 23:03:41 <EvanR> > showFFloat (Just 3) 1.23 ""
2025-12-12 23:03:43 <lambdabot> "1.230"
2025-12-12 23:03:57 <EvanR> ok it just reveals more of what floatToDigits returns
2025-12-12 23:05:42 <EvanR> the question you are referring to was, what actual algorithm is used in the Show instance for floats
2025-12-12 23:06:17 <EvanR> is the question to the linked answer
2025-12-12 23:06:57 × takuan quits (~takuan@d8D86B9E9.access.telenet.be) (Remote host closed the connection)
2025-12-12 23:08:35 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-12 23:12:20 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2025-12-12 23:13:53 × tromp quits (~textual@2001:1c00:3487:1b00:dd4:56d:fd02:60e2) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-12-12 23:19:46 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-12-12 23:22:17 × ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 256 seconds)
2025-12-12 23:24:31 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-12 23:33:15 jmcantrell_ joins (~weechat@user/jmcantrell)
2025-12-12 23:35:03 jmcantrell_ is now known as jmcantrell
2025-12-12 23:35:34 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-12-12 23:36:46 × haskellbridge quits (~hackager@96.28.224.214) (Remote host closed the connection)
2025-12-12 23:37:17 haskellbridge joins (~hackager@96.28.224.214)
2025-12-12 23:37:17 ChanServ sets mode +v haskellbridge
2025-12-12 23:39:55 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-12 23:44:48 Guest27 joins (~Guest27@0x3ec6e79e.ejb.customer.dk.telia.net)
2025-12-12 23:45:26 × Guest27 quits (~Guest27@0x3ec6e79e.ejb.customer.dk.telia.net) (Client Quit)
2025-12-12 23:50:58 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-12-12 23:54:44 × trickard_ quits (~trickard@cpe-83-98-47-163.wireline.com.au) (Ping timeout: 244 seconds)
2025-12-12 23:54:55 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
2025-12-12 23:55:35 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-12 23:57:20 trickard_ joins (~trickard@cpe-83-98-47-163.wireline.com.au)
2025-12-13 00:00:07 × peterbecich quits (~Thunderbi@71.84.33.135) (Ping timeout: 246 seconds)
2025-12-13 00:02:47 × CiaoSen quits (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) (Ping timeout: 250 seconds)
2025-12-13 00:06:45 merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl)
2025-12-13 00:13:13 × merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)

All times are in UTC.