home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.arch      Apparently more than just beeps & boops      131,241 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 130,776 of 131,241   
   Michael S to Stefan Monnier   
   Re: floating point history, word order a   
   05 Jan 26 19:26:05   
   
   From: already5chosen@yahoo.com   
      
   On Mon, 05 Jan 2026 11:55:21 -0500   
   Stefan Monnier  wrote:   
      
   > > If you look at Java's BigDecimal operations   
   > > ,   
   > > they all have versions without and width MathContext (which   
   > > includes a target scale and a rounding mode), and sometimes   
   > > additional variants (e.g., divide() has variants where you pass   
   > > just the rounding mode, or the rounding mode and scale individually   
   > > instead of through a MathContext).     
   >    
   > I wonder how that would compare in practice with a Rational type,   
   > where all arithmetic operations are exact (and thus don't need   
   > anything like a MathContext) and you simply provide a rounding   
   > function that takes two argument: a "target scale" (in the form of a   
   > target denominator) and a rounding mode.   
   >    
   > [ Extra points for implementing compiler optimizations that keep track   
   >   of the denominators statically to try and do away with the   
   >   denominators at run-time as much as possible.  Maybe also figure out   
   >   how to eliminate the use of bignums for the numerators.  🙂  ]   
   >    
   >    
   > - Stefan   
      
   exp() would be a challenge.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca