Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
15 crawler(s) on-line.
 129 guest(s) on-line.
 1 member(s) on-line.


 OldFart

You are an anonymous user.
Register Now!
 OldFart:  2 mins ago
 pavlor:  5 mins ago
 zipper:  23 mins ago
 VooDoo:  39 mins ago
 matthey:  45 mins ago
 kolla:  1 hr 58 mins ago
 michalsc:  2 hrs 8 mins ago
 amigang:  2 hrs 17 mins ago
 gryfon:  2 hrs 33 mins ago
 Rob:  3 hrs 12 mins ago

/  Forum Index
   /  Amiga Development
      /  Lua interpreter with arbitrary precision math lib.
Register To Post

PosterThread
Thorham 
Lua interpreter with arbitrary precision math lib.
Posted on 19-Oct-2014 0:28:39
#1 ]
Regular Member
Joined: 5-Mar-2014
Posts: 183
From: Unknown

Here's a build of the Lua interpreter from Lua 5.2.3: Lua

Works with Kicstart 3.0+ and 68020+ (only tested with 68030). Compiled with SASC6.58, so might work with Kicstart 2+. Does NOT require an FPU, ixemul.library, etc. Only needs standard Workbench libraries. This build of Lua doesn't support loading dynamic libraries.

To use, simply unpack the archive anywhere you want, and start from Workbench. You can also run lua.exe from the CLI directly. When starting from the CLI, use lua.exe -l mapm to start the interpreter with the math library.

Example usage of arbitrary precision floating point commands (type into the interpreter command line directly):

mapm.digits(100)
a=mapm.sqrt(12345)
b=mapm.sqrt(54321)
print(a*b)
c=mapm.number(1)
d=mapm.number(3)
e=c/d
print(e*d)

You can also use things like mapm.sin, mapm.cos, etc.

Currently there's no documentation, but you can get some pointers here:

mapm: http://www.tc.umn.edu/~ringx004/mapm-4.9.5a.tar.gz
lmapm: http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/5.2/lmapm.tar.gz

Mapm is the arbitrary precision floating point library. This contains documentation about the functions. Lmapm is the code that links mapm to lua. The file lmapm.c will show you which functions are available in the interpreter. Sorry, but it will have to do for now.

 Status: Offline
Profile     Report this post  
broadblues 
Re: Lua interpreter with arbitrary precision math lib.
Posted on 19-Oct-2014 1:09:21
#2 ]
Amiga Developer Team
Joined: 20-Jul-2004
Posts: 4446
From: Portsmouth England

@Thorham

Cool, did you port that with any particular project in mind?

_________________
BroadBlues On Blues BroadBlues On Amiga Walker Broad

 Status: Offline
Profile     Report this post  
Thorham 
Re: Lua interpreter with arbitrary precision math lib.
Posted on 19-Oct-2014 1:25:17
#3 ]
Regular Member
Joined: 5-Mar-2014
Posts: 183
From: Unknown

@broadblues

I just wanted a programmable arbitrary precision floating point math calculator. With Lua, that turned out to be pretty easy (lua+mapm+lmapm).

 Status: Offline
Profile     Report this post  

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle