Newest at the top
2025-04-28 15:16:21 +0200 | chiselfuse | (~chiselfus@user/chiselfuse) (Remote host closed the connection) |
2025-04-28 15:04:56 +0200 | tolgo | (~Thunderbi@199.115.144.130) (Ping timeout: 252 seconds) |
2025-04-28 15:02:43 +0200 | mange | (~user@user/mange) (Remote host closed the connection) |
2025-04-28 14:59:26 +0200 | mari35028 | (~mari-este@user/mari-estel) (Ping timeout: 252 seconds) |
2025-04-28 14:58:20 +0200 | weary-traveler | (~user@user/user363627) user363627 |
2025-04-28 14:57:55 +0200 | weary-traveler | (~user@user/user363627) (Quit: Konversation terminated!) |
2025-04-28 14:56:11 +0200 | visilii | (~visilii@85.172.76.90) (Ping timeout: 272 seconds) |
2025-04-28 14:55:15 +0200 | jespada | (~jespada@r186-49-240-45.dialup.adsl.anteldata.net.uy) (Ping timeout: 260 seconds) |
2025-04-28 14:52:54 +0200 | jespada_ | (~jespada@r179-25-42-1.dialup.adsl.anteldata.net.uy) jespada |
2025-04-28 14:52:04 +0200 | CiaoSen | (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) (Ping timeout: 245 seconds) |
2025-04-28 14:49:56 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2025-04-28 14:49:07 +0200 | weary-traveler | (~user@user/user363627) user363627 |
2025-04-28 14:48:00 +0200 | Googulator47 | (~Googulato@2a01-036d-0106-093f-1dc7-297e-fae3-e794.pool6.digikabel.hu) |
2025-04-28 14:47:44 +0200 | Googulator47 | (~Googulato@2a01-036d-0106-093f-1dc7-297e-fae3-e794.pool6.digikabel.hu) (Quit: Client closed) |
2025-04-28 14:47:41 +0200 | mari-estel | (~mari-este@user/mari-estel) (Read error: Connection reset by peer) |
2025-04-28 14:47:09 +0200 | tolgo | (~Thunderbi@199.115.144.130) |
2025-04-28 14:45:43 +0200 | mari35028 | (~mari-este@user/mari-estel) mari-estel |
2025-04-28 14:43:30 +0200 | AlexNoo | (~AlexNoo@178.34.151.238) (Quit: Leaving) |
2025-04-28 14:43:14 +0200 | akegalj | (~akegalj@93-139-181-11.adsl.net.t-com.hr) |
2025-04-28 14:43:07 +0200 | ystael | (~ystael@user/ystael) ystael |
2025-04-28 14:42:19 +0200 | AlexZenon | (~alzenon@178.34.151.238) (Quit: ;-) |
2025-04-28 14:36:31 +0200 | prdak | (~Thunderbi@user/prdak) prdak |
2025-04-28 14:33:20 +0200 | LainIwakura | (~LainIwaku@user/LainIwakura) LainIwakura |
2025-04-28 14:31:35 +0200 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) TheCoffeMaker |
2025-04-28 14:30:55 +0200 | LainIwakura | (~LainIwaku@user/LainIwakura) (Client Quit) |
2025-04-28 14:29:29 +0200 | TheCoffeMaker_ | (~TheCoffeM@186.136.173.186) (Quit: So long and thanks for all the fish) |
2025-04-28 14:28:17 +0200 | LainIwakura | (~LainIwaku@user/LainIwakura) LainIwakura |
2025-04-28 14:27:11 +0200 | LainIwakura | (~LainIwaku@user/LainIwakura) (Client Quit) |
2025-04-28 14:23:21 +0200 | LainIwakura | (~LainIwaku@user/LainIwakura) LainIwakura |
2025-04-28 14:08:43 +0200 | <tomsmeding> | https://hackage.haskell.org/package/base-4.19.0.0/docs/src/GHC.Float.html#line-585 |
2025-04-28 14:08:37 +0200 | <tomsmeding> | which means that the denominator of toRational on a Float or Double will always be a power of 2 |
2025-04-28 14:08:14 +0200 | <tomsmeding> | kqr: toRational for Double simply takes the "exponent * fraction" representation that the IEEE float literally encodes, and gives you that as a Rational |
2025-04-28 14:05:46 +0200 | <haskellbridge> | <Liamzee> did haddock ever fix the reusable named chunk problem? |
2025-04-28 14:05:37 +0200 | akegalj | (~akegalj@144-188.dsl.iskon.hr) (Ping timeout: 248 seconds) |
2025-04-28 14:04:21 +0200 | <tomsmeding> | kqr: anything that has something in the denominator that is not a power of 2 is not representable exactly. |
2025-04-28 14:01:32 +0200 | <kqr> | But I think I can work around it by rounding myself at some appropriate precision. |
2025-04-28 13:59:18 +0200 | <kqr> | effect due to the above! |
2025-04-28 13:59:15 +0200 | <kqr> | In my case I have a bunch of old code that uses Doubles but accidentally ran into these errors in calculations, so I'm working my way through the code to convert them to fixed-precision numbers. However, in the meantime I need a way to convert back and forth between doubles and fixed precision numbers. The primitive way I tried first was fromRational . toRational but that didn't have the intended |
2025-04-28 13:56:59 +0200 | <opqdonut> | but there's a lot of design choices to make here, and quite a bit of old research papers written as well |
2025-04-28 13:55:35 +0200 | <opqdonut> | 2.3 gets converted to float as 2.29999995231628417969, which then gets printed as 2.3 because we can know that this is the closest float to 2.3, so there can be no confusion |
2025-04-28 13:50:53 +0200 | <opqdonut> | yeah, they're interested in something like reproducability |
2025-04-28 13:49:08 +0200 | <kqr> | Wow, more numbers than I thought are irrepresentable – only double-handling functions tend to round them off so I never notice. |
2025-04-28 13:48:27 +0200 | <kqr> | I'm guessing the toRational implementation truncates the value instead of rounding it. |
2025-04-28 13:48:02 +0200 | <kqr> | You're right. I was working with too little precision to detect the difference. Thanks |
2025-04-28 13:47:41 +0200 | <kqr> | Or no, it's not |
2025-04-28 13:47:39 +0200 | <opqdonut> | 1/10 is not representable as float anyway |
2025-04-28 13:47:36 +0200 | <kqr> | If you click the double tab it shows that 2.3 is representable with double precision |
2025-04-28 13:47:29 +0200 | <opqdonut> | yeah but it's the same |
2025-04-28 13:47:24 +0200 | <kqr> | No, wait, that's for a single-precision float. |
2025-04-28 13:46:15 +0200 | <kqr> | Oh. I wonder where I went wrong in my calculations! |