Maths Library

Just starting out? Need help? Post your questions and find answers here.
jack
Addict
Addict
Posts: 1358
Joined: Fri Apr 25, 2003 11:10 pm

Post by jack »

all this change does is initialize the constants when the dll is opened, means you don't need m_apm_init() before you can access the constants, it also releses the memory used by the constants when the dll is closed.
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Post by Arctic Fox »

Thanks a lot, jack! It works like a charm :D
Is it possible to use the constants with ~520 digits instead of those with ~132?
jack
Addict
Addict
Posts: 1358
Joined: Fri Apr 25, 2003 11:10 pm

Post by jack »

yes, you will have to comment-out the 132 constant definitions and remove the comment block from the 520, then recompile
the constant file is MAPMCNST.C in case did not know.
you also need to change this line in the file M_APM_LC.H
#define VALID_DECIMAL_PLACES 128
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Post by Arctic Fox »

That's great! :D
Any news regarding m_apm_to_fixpt_stringexp() and FreeMemory()?
jack
Addict
Addict
Posts: 1358
Joined: Fri Apr 25, 2003 11:10 pm

Post by jack »

this will work

Code: Select all

ImportC "msvcrt.lib"
  free(*mem)
EndImport


al.l=m_apm_to_fixpt_stringexp(128,*MM_PI,'.',',',5)
s.s=PeekS(al)
free(al)
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Post by Arctic Fox »

Thanks a bunch jack!
It works very well! :D
Post Reply