|
|
| Author |
Message |
GTBecker
Joined: 18 Jan 2006
Posts: 457
Location: Cape Coral
|
|
Posted: 22 May 2008, 1:55 AM Post subject: Doubles? |
|
|
A question just posed on the Yahoo Basic-X group asks if 64-bit math can be done; the answer there will be no - but it's a good question to ask here.
Might a complete set of 64-bit math functions be done in native mode? |
|
| Back to top |
|
 |
mikep
Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX
|
|
Posted: 22 May 2008, 2:32 AM Post subject: |
|
|
This is an item I have asked Don about before; more to round out the language than anything else. I think that the main reason that only single precision arithmetic is supported is because there really aren't that many requirements to use double precision arithmetic (DP) on a 8-bit micro. If you really want DP then you probably also want a much faster machine like a 32-bit ARM microprocessor. After all, you are now doing some serious number crunching.
Certainly with native support you can mix C code that does DP arithmetic with ZBasic code in the same application. You would need to also handle the conversions in and out of DP from other data types as well. |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR
|
|
Posted: 22 May 2008, 6:57 AM Post subject: Re: Doubles? |
|
|
| GTBecker wrote: | | Might a complete set of 64-bit math functions be done in native mode? | It is certainly feasible. There has been some discussion on the AVR Freaks forum about this. I suspect that double precision will eventually be added to the avr-gcc compiler. |
|
| Back to top |
|
 |
|