Jump to content



Photo
- - - - -

AFX math Error


  • Please log in to reply
8 replies to this topic

#1 Roeoender

Roeoender

    UCF ASM/C Programming Only Winner

  • [Legends]
  • PipPipPipPip
  • 273 posts
  • Gender:Male
  • Location:Gdynia, Poland
  • Interests:Technical University student (informatics)
    Interests:
    Sport climbing
    Orieenting (100km walk in 23h31min)
    C/Asm on calculators

    Dislike cars

  • Calculators:
    CASIO AFX 2.0 ROM 1.01, 10 countable fingers

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. ? :hammer:
Roeoender.

#2 TomL_12953

TomL_12953

    Casio Addict

  • Members
  • PipPipPip
  • 57 posts
  • Gender:Male
  • Location:Malone, NY USA
  • Interests:Programmable calculators, BASIC computer language, Computers in general, Old movies and TV shows

  • Calculators:
    TI-59, TI-85, TI-86, TI-89, TI-89 Titanium, Radio Shack EC-4026, Algebra FX 2.0 Plus, HP-35s, Compucorp 326 Scientist, Durabrand 828, fx-9860G II SD

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

#3 Roeoender

Roeoender

    UCF ASM/C Programming Only Winner

  • [Legends]
  • PipPipPipPip
  • 273 posts
  • Gender:Male
  • Location:Gdynia, Poland
  • Interests:Technical University student (informatics)
    Interests:
    Sport climbing
    Orieenting (100km walk in 23h31min)
    C/Asm on calculators

    Dislike cars

  • Calculators:
    CASIO AFX 2.0 ROM 1.01, 10 countable fingers

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.

#4 Overlord

Overlord

    Casio Technician

  • Moderator
  • PipPipPipPipPipPip
  • 355 posts
  • Gender:Male
  • Location:Brussels - Belgium
  • Interests:Math Researcher

  • Calculators:
    My head - C300 OS 3.00 - G100 Rom 1.02 - G65 - G60 - G25

Posted 07 July 2003 - 02:32 PM

ROM 1.02

it works, no bug

#5 Roeoender

Roeoender

    UCF ASM/C Programming Only Winner

  • [Legends]
  • PipPipPipPip
  • 273 posts
  • Gender:Male
  • Location:Gdynia, Poland
  • Interests:Technical University student (informatics)
    Interests:
    Sport climbing
    Orieenting (100km walk in 23h31min)
    C/Asm on calculators

    Dislike cars

  • Calculators:
    CASIO AFX 2.0 ROM 1.01, 10 countable fingers

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.

#6 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1564 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

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.

#7 Roeoender

Roeoender

    UCF ASM/C Programming Only Winner

  • [Legends]
  • PipPipPipPip
  • 273 posts
  • Gender:Male
  • Location:Gdynia, Poland
  • Interests:Technical University student (informatics)
    Interests:
    Sport climbing
    Orieenting (100km walk in 23h31min)
    C/Asm on calculators

    Dislike cars

  • Calculators:
    CASIO AFX 2.0 ROM 1.01, 10 countable fingers

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.

#8 X-thunder28

X-thunder28

    Casio Freak

  • Members
  • PipPipPipPip
  • 192 posts

  • Calculators:
    2 Graph100 (rom 1.02 and rom 1.03 (+) )

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 !

#9 Roeoender

Roeoender

    UCF ASM/C Programming Only Winner

  • [Legends]
  • PipPipPipPip
  • 273 posts
  • Gender:Male
  • Location:Gdynia, Poland
  • Interests:Technical University student (informatics)
    Interests:
    Sport climbing
    Orieenting (100km walk in 23h31min)
    C/Asm on calculators

    Dislike cars

  • Calculators:
    CASIO AFX 2.0 ROM 1.01, 10 countable fingers

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users