Re: Request: Integer Division
- Posted by useless_ Jan 02, 2013
- 1385 views
integer X = integer_division(Y,Z)
I see no gain there. You are doing more typing, remembering a new keyword, spending more of your time, and possibly taking more cpu time to set up and execute.
The point of adding a new integer_division() would be to take less cpu time to set up and execute (as compared to the existing intdiv() in std/math.e which is slower as it involves conversion to and operations with floating point numbers).
So Eu tracks the declared type integer all thru the program, and then ignores it and converts to type atom (floating point), does the most costly math possible on it, then truncates it and re-typecasts it as integer?
Then i'd call this ticket (i mean Request for Feature?) a bug fix request.
My objection was based on hearing many years ago that Intel cpus got rid of the integer math unit and essentially ran the math halfway thru the float pipeline anyhow.
useless