Another problem w/ variables

Write here if you have problems with your Java source code

Moderator: Board moderators

Post Reply
Trinity
New poster
Posts: 12
Joined: Tue Jun 10, 2003 3:40 pm

Another problem w/ variables

Post by Trinity »

OK Guys!

Now I`m having this problem...

I`m trying to save the resoult of a factorial in a variable, but the answer in a long variable appear weird.
EX.
30!
Answer: -8764578968847253504
Which has nothing to do w/ the real answer...
What does tha `-` mean?

Then I tried to used double, but in the answer appear a `E`...
Ex.
30!
Answer: 2.652628598121911E32
I needed all the digits of the answer to solve my problem...
How can I get it?

Thanx
Trinty
Trinity
New poster
Posts: 12
Joined: Tue Jun 10, 2003 3:40 pm

Post by Trinity »

Forget about that...

I was really happy `cause I solved the problem, and then I found out that I can not use BigIntegers...

What can I use ?!


Trinity
Post Reply

Return to “Java”