AFX math Error
Started by
Roeoender
, Jul 07 2003 06:00 AM
8 replies to this topic
#1
Posted 07 July 2003 - 06:00 AM
Yesterday I needed to compute arccos() function (that is cos^-1 in Casio's notation - SHIFT+COS button) and surprisingly it wasnt able to compute cos^-1 (n)
for n in range: (-1 ,cos(135Deg)), for -1 it gives correct answer. Arccos is defined in range <-1;1> so this is definetly a bug.
Just do a graph Y1=cos^-1 (x) in range <-1,1> and see where the function is undefined.
What should I do, flame Casio co. ?
Roeoender.
for n in range: (-1 ,cos(135Deg)), for -1 it gives correct answer. Arccos is defined in range <-1;1> so this is definetly a bug.
Just do a graph Y1=cos^-1 (x) in range <-1,1> and see where the function is undefined.
What should I do, flame Casio co. ?
Roeoender.
#2
Posted 07 July 2003 - 09:08 AM
It works for me. I have an AFX 2.0 Plus. What pitch did you specify? What does the table show for each value of x? I used both .1 and .01 pitches (increments of x) over the range [-1,1].
Tom L
Tom L
#3
Posted 07 July 2003 - 11:15 AM
AFX 2.0 ROM1.01
DEG mode, FOR RAD the errous range is maller
"MA error" for:
ACOS(-0.77)
ACOS(-0.8)
ACOS(-0.9)
simply for all arguements that are < COS(135) and > -1.
I hope that everyone knows what arccos function is.
AFX2.0 PLUS has newer Algebra and CAS version, I haven't tested them yet, but I thought that math libs are in the other files (like saltire01 or so).
Roe.
DEG mode, FOR RAD the errous range is maller
"MA error" for:
ACOS(-0.77)
ACOS(-0.8)
ACOS(-0.9)
simply for all arguements that are < COS(135) and > -1.
I hope that everyone knows what arccos function is.
AFX2.0 PLUS has newer Algebra and CAS version, I haven't tested them yet, but I thought that math libs are in the other files (like saltire01 or so).
Roe.
#4
Posted 07 July 2003 - 02:32 PM
ROM 1.02
it works, no bug
it works, no bug
#5
Posted 08 July 2003 - 07:27 AM
OK, it is not a calc's fault, here is the story:
I played a little with new Touche and for ROM1.01 floating point numbers that are emulated by the Borland C don't work - they sometimes do nothing and sometimes hang the calc. In touche programs that under F1,F2,F3(and so on) keys doesn't work because of that.
I think that this floating point emulation from Borland C interacted with calculator's "math engine" and this is the cause of the error.
I have reset my calc and now it correctly computes ACOS.
Roe.
I played a little with new Touche and for ROM1.01 floating point numbers that are emulated by the Borland C don't work - they sometimes do nothing and sometimes hang the calc. In touche programs that under F1,F2,F3(and so on) keys doesn't work because of that.
I think that this floating point emulation from Borland C interacted with calculator's "math engine" and this is the cause of the error.
I have reset my calc and now it correctly computes ACOS.
Roe.
#6
Posted 08 July 2003 - 03:27 PM
well, I will remove theses shortcuts when running on ROM 1.01 until I've found a solution... Do you have a clue about this emulation problem ?
By the way can you tell me the "Coreleft" value written in "misc info" ?
On my ROM 1.02 I have 4976 bytes left.
By the way can you tell me the "Coreleft" value written in "misc info" ?
On my ROM 1.02 I have 4976 bytes left.
#7
Posted 09 July 2003 - 03:40 AM
Core left: 4672 bytes.
But I fear that the real difference is bigger.
I hope that I will find a way to get rid of launcher and/or launchtsr from memory - then Linl could be a replacement.
I also tried to fake CRC (16 or 32) of the modyfied system disk but it never worked - I fear that Casio compares byte by byte system area on flash with backup on ROM (I saw big comparing loops in deassembled code).
As for emulation problem - I know that I shold "investigate it" but I use fixed point math in my games/progs which are a lot faster and I think I will never need floats (terribly slow) that is why I am not so eager to research.
Roeoender.
But I fear that the real difference is bigger.
I hope that I will find a way to get rid of launcher and/or launchtsr from memory - then Linl could be a replacement.
I also tried to fake CRC (16 or 32) of the modyfied system disk but it never worked - I fear that Casio compares byte by byte system area on flash with backup on ROM (I saw big comparing loops in deassembled code).
As for emulation problem - I know that I shold "investigate it" but I use fixed point math in my games/progs which are a lot faster and I think I will never need floats (terribly slow) that is why I am not so eager to research.
Roeoender.
#8
Posted 09 July 2003 - 05:30 PM
roeoender, I'm convinced that there are a tip for skip that comparing loop because I don't think Casio has set the boot disk on flash! Maybe Casio have some project for that.
Other think: with IPROG, we can modify the menu and adding icone for link basic prog. But after reboot that icone remains on Casio Menu!
Some one has already installed IPROG and Downloaded the main menu flash zone ?
If there are not these icones, that should be a hint for found how to modify the boot flash zone without reset !
Other think: with IPROG, we can modify the menu and adding icone for link basic prog. But after reboot that icone remains on Casio Menu!
Some one has already installed IPROG and Downloaded the main menu flash zone ?
If there are not these icones, that should be a hint for found how to modify the boot flash zone without reset !
#9
Posted 09 July 2003 - 06:01 PM
System Disk (this data that land on the A: drive) are divided into (if I remember right ) 32K blocks - first block which contains Menu bitmap and links to the installed program is not checked in any way, but the other segments are. I have seen using mem (MSDOS standard program), maxmem (made by me) that Memdisk.sys handles drives from B: to V: (i used "mem/d" command to see it). I have spent a lot of time to make up 16/32 bit CRC for the whole system disk or it's 32Kb blocks - with same result - Memory reset.
I also think that making "fixed" boot sequence by comparing ROM with Flash contents is quite stupid, but than again Casio engineers... ;-)
It would be really nice to take over the boot sequence, get rid of Launcher,Launchtsr, and install your own file explorer. The other soultion would be overwrite the system memory with system image that hasn't got those files installed, but this is dirty solution.
Roeoender.
I also think that making "fixed" boot sequence by comparing ROM with Flash contents is quite stupid, but than again Casio engineers... ;-)
It would be really nice to take over the boot sequence, get rid of Launcher,Launchtsr, and install your own file explorer. The other soultion would be overwrite the system memory with system image that hasn't got those files installed, but this is dirty solution.
Roeoender.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users