This channel is intended for people just starting with the Raku Programming Language ( Logs are available at
Set by lizmat on 8 June 2022.
00:08 kjp left, kjp joined 00:09 kjp left, kjp joined 00:44 jgaz left 03:07 rf left 03:39 kjp left 03:40 kjp joined 03:53 Heptite left 05:22 tea3po joined 05:25 teatwo left 06:49 teatwo joined, teatwo left 06:50 teatwo joined 06:52 tea3po left 08:18 habere-et-disper joined 08:59 NemokoschKiwi joined 09:13 dakkar joined 09:22 habere-et-disper left 09:35 discord-raku-bot left 09:36 discord-raku-bot joined 10:04 NemokoschKiwi left 10:57 Heptite joined 13:09 jgaz joined 14:17 Heptite left 15:17 rf joined 15:33 Heptite joined 16:02 jgaz left 16:06 rf_ joined, rf left 16:43 jgaz joined 17:45 QhpAptyj9hj0RQwM joined
QhpAptyj9hj0RQwM Hey, is there any way to set the number of significant figures/decimal places I want Raku to use? 17:46
17:47 dakkar left
QhpAptyj9hj0RQwM The value I'm getting for 2.8284271247462 - 2.8284271247461903 is 0 17:47
Nemokosch m: say(2.8284271247462 - 2.8284271247461903) 17:48
Raku eval 0.0000000000000097
Nemokosch what is your code exactly, good sir? 17:49
QhpAptyj9hj0RQwM So I'm doing exercise 6.1 in Think Raku, and the value is 0 when it's inside the function
It's also 0 when I do: 17:50
my $x = my-sqrt(8); my $y = sqrt(8); say $x; say $y; say $x - $y;
Nemokosch m: sqrt(8).WHAT.say 17:51
Raku eval (Num)
Nemokosch perhaps that's why. a Num is just a good old floating-point value with the usual implications
QhpAptyj9hj0RQwM Ah, okay. I thought all numbers in Raku used the numerator/denominator thing 17:52
Nemokosch if you think about it, sqrt(8) is irrational so it wouldn't work any better. Another reason for floating-point numbers to still exist is performance: they are way faster than two integers "kept in sync" 17:54
teatwo floats kinda are two integers kept in sync. but it's h/w accelerated. :) 17:57
18:10 rf_ left 18:49 tea3po joined 18:52 teatwo left 19:01 tg57 joined 19:13 jgaz left 19:26 Heptite left 20:00 jgaz joined 20:16 tg57 left 21:13 jgaz left 22:08 tg57 joined 22:10 rf joined 22:47 tg57 left