[erlang-questions] A math module better than C89

Michael Truog mjtruog@REDACTED
Thu Jan 19 07:23:32 CET 2017

There was a recent pull request at https://github.com/erlang/otp/pull/1298 which was unable to go further, due to it not being clear how bigint support should exist in the math module.  The absence of bigint support has been a long-term annoyance, and the pull request attempted to move custom code from elsewhere in Erlang/OTP to make a custom bigint pow/2 (and pow/3) exposed in the math module.  I like the idea of pursuing the principle of least astonishment, and allowing the existing pow function to handle bigints, similar how you don't have to think about the difference in python (and other programming languages that people enjoy math in).  However, after determining how to do the API, it would then require work to take place to support bigints, which ideally would just be calls to libgmp functions. So, anyone with strong opinions should respond with the hope that the next source code addition might not get refused.

Best Regards,

More information about the erlang-questions mailing list