|
Roberto Ierusalimschy wrote:
To assist the team, here are the functions ready-coded in C89. These versions have been in use (by me only, AFAIK, although they are on my GitHub site in a package that I have not advertised) for more than a year.If those definitions are good enough, they can easily be implemented in Lua itself by those that need them.
Down this way lies madness. I feel strongly that the standard math functions that already exist in mathlib should stay there - with the possible exception of pow() because now there is ^
Having everyone define their own deg() rad() .... etc leaves the question of will they do it right, will there be accidental pollution of namespace etc.
mathlib has always had a set of standard functions, and I don't believe that the code space is much of an issue except on extremely embedded systems, and there the integrator has the opportunity to remove certain functions. I have done this myself.
If we're arguing "Why not add asinh() etc and any shiny new C library functions" then I would counter with - put them in xmathlib or some new extended math library that is built as an option for those that need it.
I think a small number of programmers will be surprised if basic functions that used to be available in mathlib disappeared.
Thinking about this a bit more, I even checked back to make sure Roberto's original email was not dated April 1 :-)
So my vote is leave it alone. Ralph