Numbers #9
Raku++ 5.0.0-g312cde8e prints something different from Rakudo 2026.08
Rakudo 2026.08 runs this program cleanly; the lines marked ≠ below are where the answers part. A difference is a lead, not a verdict: sometimes both are valid Raku, and sometimes Rakudo is the one that is wrong. This difference is preserved as a Rakumap finding ↗
The program
The first lines compute $value. The last four lines are the same in every program: they print what kind of thing $value is, how it looks as code, as a string, and as true or false.
sub safe-str($v) {
my $s = try $v.Str;
$s.defined ?? $s !! '<undefined>'
}
my @source = (((1+2i * 9223372036854775808) / max(7/3, 1+2i)),);
my $value = @source[0];
say "TYPE\t" ~ $value.^name;
say "RAKU\t" ~ $value.raku;
say "STR\t" ~ safe-str($value);
say "BOOL\t" ~ $value.Bool;
Run executes the program in your browser, with the Raku++ build this site ships. Edit it and try variations.
What each compiler printed
| Rakudo 2026.08 | Raku++ 5.0.0-g312cde8e | |
|---|---|---|
| Type .^name | Complex | Complex |
| Code form .raku | <0.42857142857142855+7.905747460161236e+18i> | <0.4285714285714285+7.905747460161235e+18i> ≠ |
| String .Str | 0.42857142857142855+7.905747460161236e+18i | 0.4285714285714285+7.905747460161235e+18i ≠ |
| True or false .Bool | True | True |
numeric-v1 · seed 48 · recorded 2026-09-29 with Rakudo 2026.08 and Raku++ 5.0.0-g312cde8e · Source on GitHub ↗