POV-Ray : Newsgroups : povray.off-topic : Damn that's sweet. : Re: Damn that's sweet. Server Time
3 Sep 2024 21:17:25 EDT (-0400)
  Re: Damn that's sweet.  
From: Darren New
Date: 27 Jul 2010 11:05:23
Message: <4c4ef5b3@news.povray.org>
Warp wrote:
>   Besides, 1/10 isn't an integer, so what would BCD integer registers
> help that? 

It's a scaled integer. Part of the decimal math mechanism includes aligning 
the decimal points.

 > Any solution you devise will also work with plain binary
> registers as well.

Yes, and so would floating point, if you made the registers big enough.

And, like floating point, it would be quite the PITA to translate scaled 
integer numbers into something you could print efficiently, compared to 
using BCD.

COBOL has "display" types (packed BCD) and "computation" types (two's 
complement integers), depending on what you want to do with them.

Why would plain integers be *better* than packed BCD for this sort of 
application? You're going to need specialized instructions if you want to 
run fast in either situation.

-- 
Darren New, San Diego CA, USA (PST)
    C# - a language whose greatest drawback
    is that its best implementation comes
    from a company that doesn't hate Microsoft.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.