Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Re: Are f.p. ma...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 42 Topic 8183 of 8908
Post > Topic >>

Re: Are f.p. manipulation functions only used in initialization?

by kargl@[EMAIL PROTECTED] (Steven G. Kargl) Apr 26, 2008 at 09:52 PM

In article <6_6dnatLa7meCY7VnZ2dnUVZ_qiinZ2d@[EMAIL PROTECTED]
>,
	"James Van Buskirk" <not_valid@[EMAIL PROTECTED]
> writes:
> I was writing some code with gfortran and found that spacing only
> worked in initialization expressions.  Doesn't anyone else use the
> floating point manipulation functions in ordinary expressions and
> specification expressions?  Testing with gfortran I found that
> RRSPACING, SCALE, SET_EXPONENT, and, SPACING were broken like this,
> while EXPONENT, FRACTION, and NEAREST seemed to work:
> 

(snip)
 
>
C:\gfortran\james\archpi>c:\gfortran\win64\bin\x86_64-pc-mingw32-gfortran 
> spacin
> g_bug.f90 -ospacing_bug
> 
> C:\gfortran\james\archpi>spacing_bug
>  ulps1*spacing(x1) =   4.76837158E-07
>  rrspacing(x1) =    13176795.
>  scale(x1,ulps1) =    12.566371
>  set_exponent(x1,ulps1) =    3.1415927
>  ulps*spacing(x) =    2.0000000
>  rrspacing(x) =    3.1415927
>  scale(x,ulps) =    3.1415927
>  set_exponent(x,ulps) =   0.78539819
>  size(j1) =            2
>  size(j2) =            0
>  size(j3) =            3
>  size(j4) =            0
>

mobile:kargl[203] ./z
 ulps1*spacing(x1) =   4.7683716E-07
 rrspacing(x1) =   1.3176795E+07
 scale(x1,ulps1) =    12.56637    
 set_exponent(x1,ulps1) =    3.141593    
 ulps*spacing(x) =   4.7683716E-07
 rrspacing(x) =   1.3176795E+07
 scale(x,ulps) =    12.56637    
 set_exponent(x,ulps) =    3.141593    
 size(j1) =            0
 size(j2) =          131
 size(j3) =           12
 size(j4) =            3

Appears to work for me.  Perhaps, it's an OS problem.

-- 
Steve
http://troutmask.apl.wa****ngton.edu/~kargl/
 




 42 Posts in Topic:
Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-04-26 14:43:52 
Re: Are f.p. manipulation functions only used in initialization?
kargl@[EMAIL PROTECTED]   2008-04-26 21:52:30 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-04-26 16:24:59 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-04-26 20:55:30 
Re: Are f.p. manipulation functions only used in initialization?
Charles Coldwell <cold  2008-04-27 13:00:43 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-04-27 13:53:14 
Re: Are f.p. manipulation functions only used in initialization?
lindahl@[EMAIL PROTECTED]  2008-04-28 17:25:49 
Re: Are f.p. manipulation functions only used in initialization?
kargl@[EMAIL PROTECTED]   2008-04-26 22:54:20 
Re: Are f.p. manipulation functions only used in initialization?
"Anony" <inv  2008-04-26 23:25:57 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-04-26 20:10:58 
Re: Are f.p. manipulation functions only used in initialization?
"Anony" <inv  2008-04-27 12:34:46 
Re: Are f.p. manipulation functions only used in initialization?
"FX" <couder  2008-04-27 18:37:33 
Re: Are f.p. manipulation functions only used in initialization?
Tobias Burnus <burnus@  2008-04-27 01:25:20 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-04-27 03:32:59 
Re: Are f.p. manipulation functions only used in initialization?
"FX" <couder  2008-04-27 18:39:17 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-04-30 11:17:01 
Re: Are f.p. manipulation functions only used in initialization?
Dan Nagle <dannagle@[E  2008-04-30 22:18:33 
Re: Are f.p. manipulation functions only used in initialization?
"FX" <couder  2008-04-30 22:54:21 
Re: Are f.p. manipulation functions only used in initialization?
Dan Nagle <dannagle@[E  2008-05-01 00:14:51 
Re: Are f.p. manipulation functions only used in initialization?
"FX" <couder  2008-05-01 08:06:56 
Re: Are f.p. manipulation functions only used in initialization?
lindahl@[EMAIL PROTECTED]  2008-04-30 17:53:08 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-04-30 21:37:03 
Re: Are f.p. manipulation functions only used in initialization?
Dan Nagle <dannagle@[E  2008-05-01 10:19:46 
Re: Are f.p. manipulation functions only used in initialization?
Dan Nagle <dannagle@[E  2008-04-30 22:20:37 
Re: Are f.p. manipulation functions only used in initialization?
"FX" <couder  2008-05-02 08:38:14 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-05-03 13:16:15 
Re: Are f.p. manipulation functions only used in initialization?
"FX" <couder  2008-05-04 10:46:43 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-05-05 15:53:39 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-05-05 18:24:42 
Re: Are f.p. manipulation functions only used in initialization?
Janne Blomqvist <foo@[  2008-05-06 11:05:35 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-05-06 04:01:57 
Re: Are f.p. manipulation functions only used in initialization?
Janne Blomqvist <foo@[  2008-05-06 20:32:14 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-05-06 13:50:09 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-05-06 14:37:04 
Re: Are f.p. manipulation functions only used in initialization?
"FX" <couder  2008-05-06 21:04:28 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-05-06 15:46:35 
Re: Are f.p. manipulation functions only used in initialization?
Ron Ford <ron@[EMAIL P  2008-05-06 17:34:28 
Re: Are f.p. manipulation functions only used in initialization?
"James Van Buskirk&q  2008-05-10 13:34:10 
Re: Are f.p. manipulation functions only used in initialization?
kargl@[EMAIL PROTECTED]   2008-04-27 20:30:26 
Re: Are f.p. manipulation functions only used in initialization?
"FX" <couder  2008-04-27 22:12:09 
Re: Are f.p. manipulation functions only used in initialization?
Charles Coldwell <cold  2008-04-28 10:46:00 
Re: Are f.p. manipulation functions only used in initialization?
kargl@[EMAIL PROTECTED]   2008-05-01 05:05:52 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Nov 19 8:18:11 CST 2008.