foundation icon indicating copy to clipboard operation
foundation copied to clipboard

Missing math operations: logBase, floor

Open ocharles opened this issue 7 years ago • 3 comments

ocharles avatar Jun 27 '17 21:06 ocharles

floor is roundDown

logBase hasn't been defined yet

vincenthz avatar Jun 30 '17 06:06 vincenthz

Is it really worth renaming floor? That is a very well known function name

On Fri, 30 Jun 2017, 7:19 am Vincent Hanquez, [email protected] wrote:

floor is roundDown. logBase hasn't been defined yet

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/haskell-foundation/foundation/issues/370#issuecomment-312185226, or mute the thread https://github.com/notifications/unsubscribe-auth/AABRjopGNun5Ef5pw13OgpZgbjt29MS2ks5sJJNngaJpZM4OHONN .

ocharles avatar Jun 30 '17 07:06 ocharles

we can definitely discuss it; the rational for doing that were:

  • unify with all the other mode of rounding (truncate, neareast, ceiling)
  • reduce symbol/naming pollution of the generic concept of rounding numbers by starting everything with roundXXX; the current functions are easy to bind in different context e.g. truncate... an array ? floor and ceiling are common name easily used ...

vincenthz avatar Jun 30 '17 12:06 vincenthz