{"body":"method Str {\n        # cut off exponential denorm logic below a modest value\n        my Bool $modest = ( 1/$_ < $!value.abs < $_ ) given $round-cut;\n\n        with self.error {\n            my ($value, $error, $scale);\n\n            #| Setting Controlled\n            #| >> $round-val controls rounding explicitly (e.g. 0.01)\n            with $round-val {\n                $scale = $_;\n                $value = $.value-rounded;\n                $error = $!error.absolute.&round($_);\n            }\n\n            #| Error Controlled\n            #| >> significant digits of error value control rounding\n            $scale //= .scale;\n\n            if $modest {\n                $value //= $!value.Rat.round($scale);\n                $error //= .absolute.Rat;\n            } else {\n                $value //= $!value.FatRatStr.round($scale);\n                $error //= .denorm;     #right shift error value to align digits\n            }\n\n            return \"{ $value }{ $.units } ±{ $error }\"\n        } else {\n            # no Error? Setting Controlled!\n            return \"{ $.value-rounded }{ $.units }\"\n        }\n    }","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/dwJ2NWam","modified":1778257556,"id":"dwJ2NWam","size":1107,"lines":33,"own_paste":false,"theme":"","date":1778257556}