Re: intdiv

new topic     » goto parent     » topic index » view thread      » older message » newer message
bill said...

No:

What I am saying is this function should be
killed off as it makes no sense.

With the greatest of respect, "it makes no sense" to you. The concept of finding the number of subsets involved when trying to determine the maximum number of subsets containing the same magnitude, is not nonsense to myself.

For example, if a customer buys a 5.8 meter length of tube from me and the customer wants it cut into 900mm lengths, how many lengths of tube will the customer get? The answer is 7; 6 will be 900mm long and one will be 400mm long.

bill said...

Secondly: I would say that of the maths functions
. gcd is incorrect,
. intdiv is meaningless,
. mod is incoherently described.

This says the whole of the maths module is suspect.
I don't particularly want to go through it.

Many, many functions rely on the maths module.

Well,

  • gcd() was incorrect, and then only when either operand was zero.
  • intdiv() is poorly named and doesn't handle negatives very well, but its not actually meaningless.
  • mod() is incorrectly documented with respect to negative operands, but its functionality is still correct. Remembering that we also have a remainder() function.

Without being too melodramatic, I agree that the math module still needs to undergo vigorous testing and review.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu