Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Long numbers problem
#11
you could try this:

create an array with a lot of characters, and use it to store your number. then write routines to add, subtract, multiply, and divide it by 1. integers, and 2. other "long number strings"

*peace*

Meg.
Reply
#12
Quote:absolutly not !

But I mean numbers with thousand figures !

You should've started there. Use Neo's routines. They handle numbers wit up to 32,767 figures.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#13
while bigint is nice, it isnt very *fast*... mostly because it uses string manipulation to do base 10 math. but it's good for whatever perposes you might have there. i'd like to see some kind of program that actually uses the string's variable length to create an infinately (or at least 256,000 bits) long integer. maybe i'll play with this idea myself.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#14
There is a PI calculator at ABC. It is highly optimized and saves data in integer arrays
http://www.basicguru.com/files/abc/abc9905/picalc48.bas
There used to be more sources at the author's site if you can find it.
Antoni
Reply
#15
mmhh
Very interesting !!
have the simplest tastes of the World : I satisfy myself with the best !

http://ToufQb.free.fr
Reply
#16
Touf, I started a Pi calculator last year, that contains all that large arrays calculation modules (add, substract, multiply, cartesian division, etc...).

As usually with my progs, it is not optimised at all, but non-optimised progs are great when you want to understand an algorithm.

I can post it on the Dazibao if you wish, or at M@x's...

Note that my goal is not to calculate Pi (it was just a personal revenge upon my student's years).

What I want is to calculate the FEIGENBAUM'S CONSTANT !

And that's far more exciting...
hink Global, Make Symp' All ! ®
[Image: Banner.gif]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)