Large Number support in Matlab
- From: Berk Birand <dont@xxxxxxxx>
- Date: Sat, 07 Jul 2007 15:08:20 -0400
Hi,
I am doing research in my university's cryptography lab. For one of our
projects, we need to generate a table with certain probability values,
obtained by making many combinatorics calculations including factorials,
combinations (nchoosek) etc..
The code was fully written using Matlab, and worked perfectly well.
However, yesterday I was assigned the task of converting the code from
Matlab to Maple because supposedly Matlab couldn't perform high accuracy
calculations on large numbers. This apparently caused some rounding
problems.
When I first heard about this, I explained to my advisor that the Matlab
was *the* program to use when making numerical calculations on large
datasets, while Maple was for analytical/symbolical calculations.
Therefore Matlab should be able to do any calculations much better than
any other math package. Or so I thought.
I then tried some simple operations, and was amazed by the results! Doing
factorial(200)
in Matlab, produces "Inf", while doing the same thing in Maple instantly
gives out the value. What's even more amazing, is that my handheld HP
calculator can also give me the answer to that (7.88E374) within 2
seconds. Similar errors in nchoosek (which says the result is not precise,
whereas binomial in Maple gives out the exact result) can easily be
discovered.
Surely there has to be something wrong with this!! How can a $1,000
software, running on a $2,000, 2.5GHz computer not do an operation that a
$150 calculator can!
Is there a secret option to allow these? A package, a module? I spent most
of my friday trying to get this to work in Matlab instead of writing it
over again in Maple. I still think there has to be a way....
Thanks in advance,
Berk Birand
--
Posted via a free Usenet account from http://www.teranews.com
.
- Follow-Ups:
- Re: Large Number support in Matlab
- From: Roger Stafford
- Re: Large Number support in Matlab
- From: us
- Re: Large Number support in Matlab
- Prev by Date: Re: How to read a particular line
- Next by Date: Re: How to read a particular line
- Previous by thread: Solving Symbolic Inequalities
- Next by thread: Re: Large Number support in Matlab
- Index(es):
Relevant Pages
|