Working with large numbers?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Ondra
Posts: 325
Joined: Wed Aug 29, 2007 7:33 pm
Been thanked: 2 times
Contact:

Working with large numbers?

Post by Ondra »

Good day all. I have a project where I need to manipulate, store and transmit large number values. 99,999,999 is the largest value.
Can I use a floating point variable?
Can floating point store a number that large?

Also I need to store this value in the eeprom mem.
Can one space hold such a large value?
If not how can this be done?

Thanks in advance

Ondra

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Working with large numbers?

Post by Benj »

Hello Ondra,

A float variable should be long enough but will involve using the Float manipulation functions and also include the large floating point libraries in your program. A better way would be to use a 32-bit long C variable as this is an integer so all the additional float support material is not required.

eg.

unsigned long number = 99999999;

A long can handle a max of 0 to 4294967296 or -2147483648 to 2147483647 if you leave out the unsigned command.

Please refer to David's article for help with storing and retrieving the value from the EEPROM.

http://www.matrixmultimedia.com/mmforum ... =26&t=7451

Post Reply