I wonder if the relatively new Ufixed8 types would be useful here. They use 
integer operations but present a convenient real-number interface.


> On Oct 14, 2014, at 10:27 AM, Simon Byrne <simonby...@gmail.com> wrote:
> 
> Very cool package, I learnt quite a bit about computational geometry.
> 
> I was trying to think about how you could avoid the BigInt calls. As I 
> understand it, for 2d orientation checks, you need to compare:
> 
> (ax - cx)*(by - cy) vs. (ay - cy)*(bx - cx)
> 
> If you're restricting yourself to values on the interval [1.0,2.0], then the 
> subtraction operations are all exact. For the multiplications, you can then 
> either use double-double arithmetic [1], or convert to Int64s and use widemul 
> to get an exact Int128 value.
> 
> Of course, this doesn't work directly for the incircle or 3d checks, but this 
> might be a good reason for me to implement triple- and quad-double 
> arithmetic...
> 
> -Simon
> 
> [1] https://github.com/simonbyrne/DoubleDouble.jl

Reply via email to