Not Random....

  • Thread starter Hector Martinez
  • Start date
H

Hector Martinez

I'm sorry, I was wrong, I mean Math "Round", no
Math "Random", ....

I hope you can help me, and my excuses....


Hector......
 
H

Hector Martinez

I mean :
"Round with various different types of rounding
rather than just bankers' rounding"

Can any one give some ideas???
 
J

Jon Skeet

Hector Martinez said:
I mean :
"Round with various different types of rounding
rather than just bankers' rounding"

Can any one give some ideas???

What kind of ideas? Implementation? The kinds of rounding to use?
 
H

Hector Martinez

Can any one give some ideas???
What kind of ideas? Implementation? The kinds of
rounding to use?



I'm collecting kinds of rounding to use, I don't need
Implementation ideas, "No yet"...


Thanks, for answer me... Give some Ideas.
 
J

Jon Skeet

Hector Martinez said:
I'm collecting kinds of rounding to use, I don't need
Implementation ideas, "No yet"...

Right. I would suggest:

Truncation towards 0 (0.6->0, -0.6 ->0, -0.4 -> 0)
Truncation down (0.6->0, -0.6 ->-1, -0.4 -> -1)
Round halves towards 0 (0.6->1, -0.6 ->-1, -0.4->0, 0.5->0, -0.5->0)
Round halves up (0.6->1, -0.6 ->-1, -0.4->0, 0.5->1, -0.5->0)
Round halves away from 0 (0.6->1, -0.6 ->-1, -0.4->0, 0.5->1, -0.5->-1)
Banker's round (round halves towards even)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Random... 2
Excel Pass or fail 1
Math.Log 13
Stop Re-calculating Randbetween 2
Calculate focal length from FOV on cameras 0
How to determine a point on a sine wave 5
Excel How To Convert Decimal To Inches 2
Creating a static class 5

Top