Logs: freenode/#haskell
| 2021-05-16 21:27:40 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 2021-05-16 21:27:41 | <cdsmith> | Oh wait... I guess it's mostly just changing the exponent |
| 2021-05-16 21:28:22 | <HannaM> | of course it's true .. only if some crap ilke floating points are involved, it may not, but in a mathematical sense .. |
| 2021-05-16 21:28:45 | <HannaM> | the right side can be reduced to just pi |
| 2021-05-16 21:29:05 | <cdsmith> | Yeah, the loss of floating point precision is exactly what I was looking for. |
| 2021-05-16 21:29:58 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 3.1) |
| 2021-05-16 21:30:00 | <boxscape> | > pi == pi * 1e30 / 1e30 |
| 2021-05-16 21:30:04 | <lambdabot> | True |
| 2021-05-16 21:30:35 | × | kuribas quits (~user@ptr-25vy0i8tkv6wdcurvf3.18120a2.ip6.access.telenet.be) (Remote host closed the connection) |
| 2021-05-16 21:31:10 | <cdsmith> | I think I understand why, though. Multiplication is mostly changing the exponent. I might get lucky and achieve 1 ulp or so of inaccuracy due to rounding, but I need something else to really lose accuracy |
| 2021-05-16 21:32:14 | × | LKoen quits (~LKoen@2a01cb0407597a00994eae699d6833c6.ipv6.abo.wanadoo.fr) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”) |
| 2021-05-16 21:33:52 | <ThinkPad> | pi /= asin(sin(pi)) for example |
| 2021-05-16 21:34:15 | <ThinkPad> | Wait arcsin would just give you 0 |
| 2021-05-16 21:34:25 | <boxscape> | > pi /= asin (sin pi) |
| 2021-05-16 21:34:27 | <lambdabot> | True |
| 2021-05-16 21:34:39 | <ThinkPad> | or close to 0 |
| 2021-05-16 21:35:42 | <cdsmith> | > pi == pi * 11 / 11 |
| 2021-05-16 21:35:44 | <lambdabot> | False |
| 2021-05-16 21:35:47 | <cdsmith> | That works! |
| 2021-05-16 21:37:57 | <a6a45081-2b83> | map ^.. members . _Object this gives me all values which are objects, how can I also get the key. There is a folding concept too but I'm unsure how to use that? |
| 2021-05-16 21:38:08 | <a6a45081-2b83> | *map :: Object |
| 2021-05-16 21:38:19 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 2021-05-16 21:39:23 | ← | safinaskar parts (~user@109.252.90.136) () |
| 2021-05-16 21:39:35 | × | davros quits (~davros@host86-185-126-190.range86-185.btcentralplus.com) (Remote host closed the connection) |
| 2021-05-16 21:39:36 | <cdsmith> | > > (pi * 11 / 11 - pi, encodeFloat 1 (snd (decodeFloat pi))) |
| 2021-05-16 21:39:38 | <lambdabot> | <hint>:1:1: error: <hint>:1:1: error: parse error on input ‘>’ |
| 2021-05-16 21:39:42 | <cdsmith> | > (pi * 11 / 11 - pi, encodeFloat 1 (snd (decodeFloat pi))) |
| 2021-05-16 21:39:44 | <lambdabot> | (-4.440892098500626e-16,4.440892098500626e-16) |
| 2021-05-16 21:39:53 | <cdsmith> | There we go! 1 ulp of error |
| 2021-05-16 21:40:24 | → | mounty joins (~mounty@236.216.214.218.sta.wbroadband.net.au) |
| 2021-05-16 21:42:19 | × | falafel quits (~falafel@2603-8001-ca00-f555-b4a5-fa93-bc1a-b3d6.res6.spectrum.com) (Ping timeout: 250 seconds) |
| 2021-05-16 21:42:51 | → | usr25 joins (~usr25@unaffiliated/usr25) |
| 2021-05-16 21:43:17 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 2021-05-16 21:44:04 | × | mnrmnaugh quits (~mnrmnaugh@unaffiliated/mnrmnaugh) (Quit: Leaving) |
| 2021-05-16 21:44:26 | → | notzmv- joins (~zmv@unaffiliated/zmv) |
| 2021-05-16 21:44:41 | → | mnrmnaugh joins (~mnrmnaugh@unaffiliated/mnrmnaugh) |
| 2021-05-16 21:46:14 | × | patlv quits (~patlv@unaffiliated/patlv) (Ping timeout: 245 seconds) |
| 2021-05-16 21:47:15 | <boxscape> | > (pi, pi * 11/11) |
| 2021-05-16 21:47:16 | <lambdabot> | (3.141592653589793,3.1415926535897927) |
| 2021-05-16 21:47:43 | <boxscape> | > (pi :: Double, pi * 11/11) |
| 2021-05-16 21:47:45 | <lambdabot> | (3.141592653589793,3.1415926535897927) |
| 2021-05-16 21:47:53 | <boxscape> | oh wait, Double is the default |
| 2021-05-16 21:47:59 | <boxscape> | > (pi :: Float, pi * 11/11) |
| 2021-05-16 21:48:00 | <lambdabot> | (3.1415927,3.1415926535897927) |
| 2021-05-16 21:48:07 | <boxscape> | > (pi :: Float, pi * 11/11 :: Float) |
| 2021-05-16 21:48:09 | <lambdabot> | (3.1415927,3.141593) |
| 2021-05-16 21:48:16 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds) |
| 2021-05-16 21:48:36 | <boxscape> | still works |
| 2021-05-16 21:49:07 | × | dmytrish_ quits (~mitra@37.228.247.154) (Quit: Konversation terminated!) |
| 2021-05-16 21:49:16 | → | dmytrish_ joins (~mitra@37.228.247.154) |
| 2021-05-16 21:49:53 | <cdsmith> | Yeah, but I think that's coincidence. |
| 2021-05-16 21:50:15 | → | Lycurgus joins (~niemand@cpe-45-46-140-49.buffalo.res.rr.com) |
| 2021-05-16 21:50:24 | <cdsmith> | > (1*11/11 :: Double, 1*11/11 :: Float) |
| 2021-05-16 21:50:25 | <lambdabot> | (1.0,1.0) |
| 2021-05-16 21:50:37 | <cdsmith> | Yeah, works for pi,. but not for 1.0 |
| 2021-05-16 21:50:50 | × | wroathe quits (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 246 seconds) |
| 2021-05-16 21:51:08 | <cdsmith> | But, at least that gives me one example, which is enough for a unit test. :) |
| 2021-05-16 21:51:30 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-05-16 21:51:40 | × | dmytrish_ quits (~mitra@37.228.247.154) (Client Quit) |
| 2021-05-16 21:51:47 | → | dmytrish joins (~mitra@37.228.247.154) |
| 2021-05-16 21:52:00 | → | sheepduck joins (~sheepduck@2607:fea8:2a60:b700::cafd) |
| 2021-05-16 21:52:08 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 2021-05-16 21:52:17 | × | dmytrish quits (~mitra@37.228.247.154) (Client Quit) |
| 2021-05-16 21:52:40 | × | fendor quits (~fendor@91.141.2.211.wireless.dyn.drei.com) (Remote host closed the connection) |
| 2021-05-16 21:53:58 | → | dmytrish joins (~mitra@2a02:8084:a82:d900:581:a2bd:73ab:25fb) |
| 2021-05-16 21:56:48 | × | heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2021-05-16 21:58:26 | → | dmytrish_ joins (~mitra@2a02:8084:a82:d900:5051:16e0:8e89:e082) |
| 2021-05-16 22:00:28 | → | Rudd0 joins (~Rudd0@185.189.115.108) |
| 2021-05-16 22:01:56 | × | Ariakenom quits (~Ariakenom@2001:9b1:efb:fc00:8515:6952:6c0e:748) (Quit: Leaving) |
| 2021-05-16 22:02:31 | × | dmytrish quits (~mitra@2a02:8084:a82:d900:581:a2bd:73ab:25fb) (Ping timeout: 260 seconds) |
| 2021-05-16 22:04:20 | <cdsmith> | Oh, found a better example, though. |
| 2021-05-16 22:04:25 | <cdsmith> | > sum (replicate 100 0.01) |
| 2021-05-16 22:04:26 | <lambdabot> | 1.0000000000000007 |
| 2021-05-16 22:06:36 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:8dd2:2363:77ad:18a2) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-05-16 22:06:41 | <boxscape> | > 0.1 + 0.2 |
| 2021-05-16 22:06:43 | <lambdabot> | 0.30000000000000004 |
| 2021-05-16 22:07:59 | → | chris__ joins (~chris@81.96.113.213) |
| 2021-05-16 22:08:22 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 2021-05-16 22:08:59 | <cdsmith> | Yeah, but I like (replicate 100 0.01) because it's basically guaranteed to give an incorrect result regardless of details (unless the radix is a multiple of 10...) |
| 2021-05-16 22:09:26 | × | Lycurgus quits (~niemand@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt) |
| 2021-05-16 22:10:50 | × | oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 245 seconds) |
| 2021-05-16 22:11:53 | → | hololeap joins (~hololeap@gateway/tor-sasl/hololeap) |
| 2021-05-16 22:12:01 | × | gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving) |
| 2021-05-16 22:12:02 | × | mouseghost quits (~draco@wikipedia/desperek) (Quit: mew wew) |
| 2021-05-16 22:12:31 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 2021-05-16 22:16:28 | → | Rudd0^ joins (~Rudd0@185.189.115.103) |
| 2021-05-16 22:18:59 | × | ixlun quits (~user@109.249.184.235) (Read error: Connection reset by peer) |
| 2021-05-16 22:19:09 | × | Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 252 seconds) |
| 2021-05-16 22:19:57 | × | __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving) |
| 2021-05-16 22:20:24 | × | hyiltiz quits (~quassel@unaffiliated/hyiltiz) (Ping timeout: 245 seconds) |
| 2021-05-16 22:21:14 | × | Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 260 seconds) |
| 2021-05-16 22:22:54 | → | hyiltiz joins (~quassel@unaffiliated/hyiltiz) |
| 2021-05-16 22:23:09 | × | hololeap quits (~hololeap@gateway/tor-sasl/hololeap) (Ping timeout: 240 seconds) |
| 2021-05-16 22:23:19 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 245 seconds) |
| 2021-05-16 22:23:55 | → | patlv joins (~patlv@unaffiliated/patlv) |
| 2021-05-16 22:24:16 | → | ddellacosta joins (~ddellacos@86.106.143.113) |
| 2021-05-16 22:25:28 | → | nicholasbulka joins (~nicholasb@2601:900:4301:da0:b0b3:4831:47cc:ab06) |
| 2021-05-16 22:25:29 | × | gedda quits (~gedda@s176125235103.blix.com) (Quit: leaving) |
| 2021-05-16 22:26:14 | → | ixlun joins (~user@109.249.184.235) |
| 2021-05-16 22:26:58 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
All times are in UTC.