Unfortunately, I'm not having any luck with GMP.

Does anyone know of any other small, platform independent libraries which can help me out?]]>

Honestly, it's a little degrading that I wasn't able to get it to work after spending about a half hour with it :-P]]>

(They don't have already compiled versions on their site anywhere do they?)]]>

I will try to create a fake precise float and see, if my (old) Athlon accepts it.

@PhoenixTank: thanks for the link, looks great.]]>

Quote

**PhoenixTank**

http://gmplib.org/

Perhaps useful to you, Arikado?

Wow, looks great. I'll let you know if I can come up with anything. Thanks :-)]]>http://gmplib.org/

Perhaps useful to you, Arikado?

Perhaps useful to you, Arikado?]]>

Quote

**daniel_c_w**

For a calculator, you should definitly use a software implementation for fractions and big numbers.

You need precision

Can you elaborate a bit please? Like what types of software should I implement?QuoteArikadoEdit:Oh, and I'm cross developing a calculator application

For a calculator, you should definitly use a software implementation for fractions and big numbers.

You need precision

I have a working calculator, and I have (what should be) a working algorithm to incorporate decimal numbers, I just can't use any C++ storage containers. If there's some software (like a small class) I can implement that can hold zero, whole numbers, decimal numbers, and return its member's stored values, please let me know.

Also, I've released what I have so far on my extra programs page here: [www.wiibrew.org]

Or you can read the latest blog post release here: [arikadosblog.blogspot.com]

Quote

**Arikado**

**Edit:** Oh, and I'm cross developing a calculator application

For a calculator, you should definitly use a software implementation for fractions and big numbers.

You need precision]]>

(I shlashed through the wrong parts)

For example:

Doubles use 52 bits for the fraction. Fraction is like an u52, an unsigned integer, that can hold all values from 0 to 2^52.

The sign is encoded seperately.

Keep in mind, that precision may be lost during all arithmetic operations with floats and doubles.

(oh and if you use floats, C and C++ will convert them to doubles everytime you use them in a function call)]]>

floats: [en.wikipedia.org]

doubles: [en.wikipedia.org]

long doubles: [en.wikipedia.org]

The first bit indicates the sign.

The type can not be unsigned.

(in Visual C++ "unsigned double" leads to:

warning C4076: 'unsigned' : can not be used with type 'double')]]>

Quote

**daniel_c_w**

Floats and doubles should be able to support negative numbers. The first bit indicates the sign.

What about declaring it signed double? or signed long double?]]>Floats and doubles should be able to support negative numbers. The first bit indicates the sign.

Maybe SSE or other extensions support a floating point type more precise than double.

PowerPC proccessors nativley support a 128 bit float. That would be a long double.

I do not know the bit pattern for it.

Floats and doubles should be able to support negative numbers. The first bit indicates the sign.]]>QuoteArikado

AFAIK, It can't be set to anything that's 0 or less or it will freak out. (As will float)

The "long" keyword dictates that it will be able to hold greater values than a type without it.]]>

Anyway, if you need a larger integer or floating point number, than the platform provides, then you need to implement it yourself.]]>

What are you trying to do, finding a good aproximation of Pi with the Wii?]]>

Thanks in advance to all answers,

-Arikado]]>