I'm making a replacement for some common math calculations in lua, it will have functions instead of writing like '10 + 5', so it won't be exactly the same. So far, I've only done plus (+) and greater than (>), but I'm planning to add more, for example minus (-), multiplication (*), division (/), ! and ^. Well, why am I making this when it already exists? Because it supports much more decimals than the current one, actually, it supports as many decimals as the highest lua number (except from math.huge). It's rather fast and when I ran the first time test on plus calculation (which isn't a fair time testing calculation, it's not very complicated), with 100 digits and it took only a little less than 0.001 seconds.
Do you think this could be useful? Or maybe a fun test, I want your thoughts
Math with alot of decimals
Re: Math with alot of decimals
Such a library should probably be implemented in C to be faster.
Well actually, here is one: http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lbc
Although it is indeed interesting to code stuff for the fun, I doubt that big numbers (arbitrary precision) are necessary for game development. I'd like to see your code though
Well actually, here is one: http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lbc
Although it is indeed interesting to code stuff for the fun, I doubt that big numbers (arbitrary precision) are necessary for game development. I'd like to see your code though
"When in doubt, use brute force." Ken Thompson
Re: Math with alot of decimals
Well, I guess it's pretty useless, and it's pretty boring to make too...
And I wanna get started with my GUI for LÖVE 0.6.0, so I will publish the code here, having addition (math2.AddMultiple) and greater than (math2.IsBigger).
And I wanna get started with my GUI for LÖVE 0.6.0, so I will publish the code here, having addition (math2.AddMultiple) and greater than (math2.IsBigger).
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 2 guests