Always false float comparisons

Era Scarecrow via Digitalmars-d digitalmars-d at puremagic.com
Wed May 18 12:53:10 PDT 2016


On Wednesday, 18 May 2016 at 19:36:59 UTC, tsbockman wrote:
> I agree that intrinsics for this would be nice. I doubt that 
> any current D platform is actually computing the full 128 bit 
> result for every 64 bit multiply though - that would waste both 
> power and performance, for most programs.

  Except the 128 result is _already_ there for 0 cost (at least 
for x86 instructions that I'm aware). There's bound to be enough 
cases (say pseudo random number generation, encryption, or 
numerical processing above 64bits) I'd like access to it 
supported by the language and not having to inject instructions 
using the asm command.

  This is also the same with the division where the number could 
be a 128bit number divided by a 64bit divisor. We could get the 
main benefit of the 128bit cent with very few instructions if we 
simply guarantee one of the two arguments smaller than 65 bits 
(although the dividend and remainder both need to be 64 bits or 
smaller)


More information about the Digitalmars-d mailing list