From: Dustin on
I'm trying to figure out how to get fprintf to display large decimal numbers in their entirety. This is what I've been getting:

>> fprintf('%ld\n',intmax('uint64'))
1.844674e+19

Instead, I'd like this to return the entire number: 18446744073709551615. Any hints on the appropriate format string to pass it?

Thanks!
Dustin
From: Ashish Uthama on
On Sun, 09 May 2010 23:32:07 -0400, Dustin <matlab_newsgroup(a)iforgot.us>
wrote:

> I'm trying to figure out how to get fprintf to display large decimal
> numbers in their entirety. This is what I've been getting:
>
>>> fprintf('%ld\n',intmax('uint64'))
> 1.844674e+19
>
> Instead, I'd like this to return the entire number:
> 18446744073709551615. Any hints on the appropriate format string to pass
> it?
>
> Thanks!
> Dustin


doc fprintf:

>> fprintf('%lu\n',intmax('uint64'))
18446744073709551615
From: Dustin on
Unfortunately, that's not the response I get (R2009b):
>> fprintf('%lu\n',intmax('uint64'))
1.844674e+19

Dustin

"Ashish Uthama" <first.last(a)mathworks.com> wrote in message <op.vchqdzjaa5ziv5(a)uthamaa.dhcp.mathworks.com>...
> On Sun, 09 May 2010 23:32:07 -0400, Dustin <matlab_newsgroup(a)iforgot.us>
> wrote:
>
> > I'm trying to figure out how to get fprintf to display large decimal
> > numbers in their entirety. This is what I've been getting:
> >
> >>> fprintf('%ld\n',intmax('uint64'))
> > 1.844674e+19
> >
> > Instead, I'd like this to return the entire number:
> > 18446744073709551615. Any hints on the appropriate format string to pass
> > it?
> >
> > Thanks!
> > Dustin
>
>
> doc fprintf:
>
> >> fprintf('%lu\n',intmax('uint64'))
> 18446744073709551615
From: Walter Roberson on
Dustin wrote:
> Unfortunately, that's not the response I get (R2009b):
>>> fprintf('%lu\n',intmax('uint64'))
> 1.844674e+19

In 2008b I am seeing the same behaviour that you indicate.
From: Dustin on
Bump?

Walter Roberson <roberson(a)hushmail.com> wrote in message <hs9li9$pvh$2(a)canopus.cc.umanitoba.ca>...
> Dustin wrote:
> > Unfortunately, that's not the response I get (R2009b):
> >>> fprintf('%lu\n',intmax('uint64'))
> > 1.844674e+19
>
> In 2008b I am seeing the same behaviour that you indicate.