Re: Command line display format [message #75761] |
Wed, 04 May 2011 13:17 |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On May 4, 4:54 pm, David Fanning <n...@idlcoyote.com> wrote:
> Paulo Penteado writes:
>> By the way, David: the search box in idlcoyote.com needs updating. It
>> is still searching on dfanning.com, and finding nothing.
>
> Well, I thought I fixed this yesterday. I just tried
> the one onwww.idlcoyote.comand it seems to be searching
> the right domain. Which box Search Box were you using?
The one at the bottom of
http://www.idlcoyote.com/documents/tips.php
|
|
|
Re: Command line display format [message #75763 is a reply to message #75761] |
Wed, 04 May 2011 12:54  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Paulo Penteado writes:
> By the way, David: the search box in idlcoyote.com needs updating. It
> is still searching on dfanning.com, and finding nothing.
Well, I thought I fixed this yesterday. I just tried
the one on www.idlcoyote.com and it seems to be searching
the right domain. Which box Search Box were you using?
I had exactly the same problem yesterday, searching for
the same "sky is falling" article. It works for me today.
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Command line display format [message #75765 is a reply to message #75763] |
Wed, 04 May 2011 12:27  |
Ammar Yusuf
Messages: 36 Registered: October 2010
|
Member |
|
|
On May 4, 3:14 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On May 4, 4:06 pm, Ammar Yusuf <amyus...@gmail.com> wrote:
>
>> Oh okay. Do you know why this happened or is this just part of
>> floating point representation?
>> I would expect 1260.20 - 1260.10 to return 0.1.
>
> http://www.idlcoyote.com/math_tips/sky_is_falling.html
>
> By the way, David: the search box in idlcoyote.com needs updating. It
> is still searching on dfanning.com, and finding nothing. It was easy
> to notice when I searched for Sky is Falling, and nothing came up.
Thanks!
|
|
|
Re: Command line display format [message #75768 is a reply to message #75765] |
Wed, 04 May 2011 12:14  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On May 4, 4:06 pm, Ammar Yusuf <amyus...@gmail.com> wrote:
> Oh okay. Do you know why this happened or is this just part of
> floating point representation?
> I would expect 1260.20 - 1260.10 to return 0.1.
http://www.idlcoyote.com/math_tips/sky_is_falling.html
By the way, David: the search box in idlcoyote.com needs updating. It
is still searching on dfanning.com, and finding nothing. It was easy
to notice when I searched for Sky is Falling, and nothing came up.
|
|
|
Re: Command line display format [message #75770 is a reply to message #75768] |
Wed, 04 May 2011 12:06  |
Ammar Yusuf
Messages: 36 Registered: October 2010
|
Member |
|
|
On May 4, 3:01 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On May 4, 3:56 pm, Ammar Yusuf <amyus...@gmail.com> wrote:
>
>> Hi, so I did this in the command line:
>> IDL> print, wave_special[2], wave_special[1], wave_special[2]-
>> wave_special[1]
>> 1260.20 1260.10 0.0999756
>
>> I was hoping it would print out 0.10 but it's something really close.
>> How can I display in my command line the actual values of
>> wave_special. I know in Matlab you can type format short, format long,
>> to do it.
>
>> Is using the print format the only way to see? Thanks!
>
> If what you are looking for is format control, you can use the format
> keyword to print. Using Fortran-style formats, it could be something
> like:
>
> print,wave_special[2], wave_special[1], wave_special[2]-
> wave_special[1],format='(3E22.15)'
>
> See the help on print for more details on format codes, including how
> to use C-style formats.
Oh okay. Do you know why this happened or is this just part of
floating point representation?
I would expect 1260.20 - 1260.10 to return 0.1.
|
|
|
Re: Command line display format [message #75771 is a reply to message #75770] |
Wed, 04 May 2011 12:01  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On May 4, 3:56 pm, Ammar Yusuf <amyus...@gmail.com> wrote:
> Hi, so I did this in the command line:
> IDL> print, wave_special[2], wave_special[1], wave_special[2]-
> wave_special[1]
> 1260.20 1260.10 0.0999756
>
> I was hoping it would print out 0.10 but it's something really close.
> How can I display in my command line the actual values of
> wave_special. I know in Matlab you can type format short, format long,
> to do it.
>
> Is using the print format the only way to see? Thanks!
If what you are looking for is format control, you can use the format
keyword to print. Using Fortran-style formats, it could be something
like:
print,wave_special[2], wave_special[1], wave_special[2]-
wave_special[1],format='(3E22.15)'
See the help on print for more details on format codes, including how
to use C-style formats.
|
|
|