<div dir="ltr"><div dir="ltr">On Thu, Jun 1, 2023 at 10:35 AM Brian Goetz <<a href="mailto:brian.goetz@oracle.com">brian.goetz@oracle.com</a>> wrote:<br></div><div dir="ltr"><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><font size="4"><font face="monospace">Rational is unfortunate because the default representation (when
used improperly) can lead to DBZE, but has a sensible default of
zero -- except for that pesky denominator. However, I think
this is a removable discontinuity, where the author can make up
for this with some careful coding:<br></font></font></div></blockquote><div><br></div><div>It helps a bit that you want to canonicalize all 0/n to <i>something</i> anyway, and rational operations are already busy taking the gcd and ensuring positive denominator as it is. The need to internally represent zero as 0/0 probably adds little incremental pain in *this* case, but there will be others where it does. Still, overall it seems like a very fine trade-off.</div><div><br></div><div><br></div></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="line-height:1.5em;padding-top:10px;margin-top:10px;color:rgb(85,85,85);font-family:sans-serif"><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(213,15,37);padding-top:2px;margin-top:2px">Kevin Bourrillion |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(51,105,232);padding-top:2px;margin-top:2px"> Java/Kotlin Ecosystem Team |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(0,153,57);padding-top:2px;margin-top:2px"> Google, Inc. |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(238,178,17);padding-top:2px;margin-top:2px"> <a href="mailto:kevinb@google.com" target="_blank">kevinb@google.com</a></span></div></div></div></div></div></div></div></div>