Re: Funny old trick



"*** T. Winter" wrote:
>
.... snip ...
>
> Oh, it is quite clever. But there are so many people that discovered
> it independently. The whole point is that in C it makes no sense.
> Now, how about getting the decimals of an unsigned integer number
> below 1000 using only shifts and additions/subtractions...

Why limit yourself to values below 1000? See:

<http://cbfalconer.home.att.net/download/dubldabl.txt>

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson


.