From: hugh on

hi guys,

i've just made a quick intermediate 0.2 release of hplua. my main plan is
to get
the graphics library to a release state, but i saw a way to change the
fundamental
numerical type over from binary to decimal.

fundamentally this is a big change, so it made sense to get it in early,
otherwise
my confidence on results would be low.

on the upside, hplua now sports a spiffing 20 digit accuracy across all
scientific
functions, plus we have non-integer factorials, hp style :-)

here's pi factorial,

=math.fact(math.pi)
7.1880827289760327021
exit

From: Damir on
On Sun, 04 Feb 2007 21:50:46 -0000, hugh
<spam.egg.sausage(a)spamcafe.com> wrote:

>
>hi guys,
>
>i've just made a quick intermediate 0.2 release of hplua. my main plan is
>to get
>the graphics library to a release state, but i saw a way to change the
>fundamental
>numerical type over from binary to decimal.
>
>fundamentally this is a big change, so it made sense to get it in early,
>otherwise
>my confidence on results would be low.
>
>on the upside, hplua now sports a spiffing 20 digit accuracy across all
>scientific
>functions, plus we have non-integer factorials, hp style :-)
>
>here's pi factorial,
>
>=math.fact(math.pi)
> 7.1880827289760327021
>exit

Hello.
Please explain to me how to run samples for hplua.
On which port I must store them?
Thank you.
Damir
From: Ingo Blank on
hugh schrieb:
>
> hi guys,
>
> i've just made a quick intermediate 0.2 release of hplua. my main plan
> is to get
> the graphics library to a release state, but i saw a way to change the
> fundamental
> numerical type over from binary to decimal.

hi,

I checked out the recent version and tried to make:

arm-elf-g++ -fno-rtti -fno-exceptions -mtune=arm920t -mcpu=arm920t
-DHPLUA -msoft-float -mlittle-endian -fomit-frame-poi
nter -Wall -Os -Istubs -Ibcd20 -I"C:\hpgcc-2.0-native-win32\include"
-L"C:\hpgcc-2.0-native-win32\lib" -mthumb-interwork -mthumb -x c++ -c
-o lcode.o lcode.c
lcode.c: In function 'int addk(FuncState*, TValue*, TValue*)':
lcode.c:232: error: 'ifloor' was not declared in this scope
make: *** [lcode.o] Error 1


--
Ingo Blank
http://hpgcc.org
http://blog.hpgcc.org

From: hugh on


hmm..

well, ifloor is coming from the number2int macro here.

#define lua_2int(d) ifloor(d)
#define lua_number2int(i,d) ((i)=lua_2int(d))

and should be defined from bcd.h here,


friend int4 ifloor(const BCD& a)
{ return BCDFloat::ifloor(&a._v); }

if i change this "ifloor" to "imoose", i get the same error, so your
system's
not seeing it for some reason.

ok, i have,

arm-elf-g++ -v
Using built-in specs.
Target: arm-elf
Configured with: ../gcc-4.0.2/configure --target=arm-elf
--prefix=/g/gnuarm-4.0.2 --enable-interwork --enable-multilib
--with-newlib --with-headers=../newlib-1.14.0/newlib/libc/include
--enable-languages=c,c++
Thread model: single
gcc version 4.0.2

and i got this version from www.gnuarm.com installation file,

27/01/2007 21:28 26,063,274
bu-2.16.1_gcc-4.0.2-c-c++_nl-1.14.0_gi-6.4.exe

can you check your compiler version?


On Mon, 05 Feb 2007 13:58:49 -0000, Ingo Blank
<ingo.news01REMOVE_UPPERCASE(a)hpgcc.org> wrote:

>
> hi,
>
> I checked out the recent version and tried to make:
>
> arm-elf-g++ -fno-rtti -fno-exceptions -mtune=arm920t -mcpu=arm920t
> -DHPLUA -msoft-float -mlittle-endian -fomit-frame-poi
> nter -Wall -Os -Istubs -Ibcd20 -I"C:\hpgcc-2.0-native-win32\include"
> -L"C:\hpgcc-2.0-native-win32\lib" -mthumb-interwork -mthumb -x c++ -c
> -o lcode.o lcode.c
> lcode.c: In function 'int addk(FuncState*, TValue*, TValue*)':
> lcode.c:232: error: 'ifloor' was not declared in this scope
> make: *** [lcode.o] Error 1
>
>
> --
> Ingo Blank
> http://hpgcc.org
> http://blog.hpgcc.org
>

From: hugh on


because i haven't managed to get hplua to run stand alone yet, you have to
launch it from the ARMToolbox. have a look at the hplua/README.TXT how to
install
the toolbox. also there's more details in the ArmToolBox directory

if you can run HPlua and get the initial message you are ready to go!
Remember to exit with "exit" (no quotes) on a line of its own. this gets
you
back to the calculator normal.

to load a sample, do (inside lua)

dofile("sunset.lua")
sunset()

The keyboard is a bit weird in hplua and is something i want to improve.

i strongly advise using a pc to write all the stuff to a SD card in the
same directory. that's lua.hp and all the *.lua samples and then put
the card into the calculator. use file FILES feature to get to the lua.hp
binary, press RCL and PrRun (from the installed toolbox lib).

hope this helps,





On Mon, 05 Feb 2007 12:01:09 -0000, Damir <no(a)email.com> wrote:

> On Sun, 04 Feb 2007 21:50:46 -0000, hugh
> <spam.egg.sausage(a)spamcafe.com> wrote:
>
>>
>> hi guys,
>>
>> i've just made a quick intermediate 0.2 release of hplua. my main plan
>> is
>> to get
>> the graphics library to a release state, but i saw a way to change the
>> fundamental
>> numerical type over from binary to decimal.
>>
>> fundamentally this is a big change, so it made sense to get it in early,
>> otherwise
>> my confidence on results would be low.
>>
>> on the upside, hplua now sports a spiffing 20 digit accuracy across all
>> scientific
>> functions, plus we have non-integer factorials, hp style :-)
>>
>> here's pi factorial,
>>
>> =math.fact(math.pi)
>> 7.1880827289760327021
>> exit
>
> Hello.
> Please explain to me how to run samples for hplua.
> On which port I must store them?
> Thank you.
> Damir