comp.lang.ada
 help / color / mirror / Atom feed
* Multiplying fixed-point by long integer
@ 2012-10-05  1:46 Adam Beneschan
  2012-10-05  2:12 ` Shark8
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Adam Beneschan @ 2012-10-05  1:46 UTC (permalink / raw)


I don't think I've ever seen this problem discussed before ...

4.5.5 defines predefined multiplication operators between any fixed-point type and Integer.  However, it isn't defined for any other integer type.  This can cause a problem if I have an integer type whose bounds are larger than Integer, since it obviously won't work to convert it to Integer.  Has anyone encountered this problem before, and how did you solve it?  I'm hesitant to try to solve it by converting things to floating point, since the mantissa of a floating-point may have fewer bits than the fixed-point or integer type, and fixed-point multiplication by an integer should be exact.

                                 -- thanks, Adam



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-11-08  5:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-05  1:46 Multiplying fixed-point by long integer Adam Beneschan
2012-10-05  2:12 ` Shark8
2012-10-05  4:23 ` Jeffrey Carter
2012-10-05  4:25 ` tmoran
2012-10-05 15:41   ` Adam Beneschan
2012-10-05  5:14 ` anon
2012-11-06 17:20 ` Jacob Sparre Andersen
2012-11-06 20:33   ` Adam Beneschan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox