[erlang-questions] math ceil floor

Technion technion@REDACTED
Fri Jun 3 00:42:03 CEST 2016

Following from other languages, C's ceil returns floats, but Ruby's ceil returns an Integer, PHP returns a float.

I'm seeing here there isn't a particularly accepted standard.

From: erlang-questions-bounces@REDACTED <erlang-questions-bounces@REDACTED> on behalf of Dan Gudmundsson <dangud@REDACTED>
Sent: Thursday, 2 June 2016 7:56:32 PM
To: Erlang Questions
Subject: [erlang-questions] math ceil floor

I made pull request https://github.com/erlang/otp/pull/1084 which implements ceil and floor in the math module.

The question is, should they return integer or floats?

The implementation in the PR currently returns integers and also implements ceilf and floorf which returns floats.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160602/7295a2bb/attachment.htm>

More information about the erlang-questions mailing list