Large Number support in Matlab



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

.



Relevant Pages

  • Re: Large Number support in Matlab
    ... obtained by making many combinatorics calculations including factorials, ... The code was fully written using Matlab, ... Matlab to Maple because supposedly Matlab couldn't perform high accuracy ...
    (comp.soft-sys.matlab)
  • Re: Large Number support in Matlab
    ... obtained by making many combinatorics calculations including factorials, ... The code was fully written using Matlab, ... Matlab to Maple because supposedly Matlab couldn't perform high accuracy ...
    (comp.soft-sys.matlab)
  • Re: How to access variables used in GUI on Matlab prompt
    ... I want to set up a project which performs calculations in a few ... As it is a research help and is not a final GUI it needs to ... matlab application? ... I am using global variables but they do only show up in the Matlab ...
    (comp.soft-sys.matlab)
  • Re: Creating tables on MATLAB
    ... Since many calculations were done ... using MATLAB I would like to present my results on the best way ... Can I plot different graphs on one plot with different y-axis? ... Load factor Basic airload Propeller air load ...
    (comp.soft-sys.matlab)
  • Re: Large Number support in Matlab
    ... <SNIP down to good thinking... ... > Can I perform those calculations using Maple, ... since the numbers returned by Maple can't be ... achieving what I want to do using Matlab, ...
    (comp.soft-sys.matlab)