Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29276 Discussions

How to convert a real(8) data to real(16) ?

Zhanghong_T_
Novice
3,973 Views

Hi all,

I tried to assign a variable defined as real(8) to another one defined as real(16) just by

b=a

However, it is not what I expected. For example,

a=2.48740685923698

then

b=2.48740685923698290338279548450373

However, I wish b be equal to

2.48740685923698000000000000000000

exactly.

Could anyone tell me how to assign the value of a to b?

Thanks,

Zhanghong Tang

0 Kudos
22 Replies
g_f_thomas
Beginner
433 Views
tangzhanghong98@yahoo.com:

Gerry, you mentioned the'interval or stochastic arithmetical techniques', where can I find the introduction of that? is it helpful to solve my problem? By the way, I can't open the forum you said.

Thanks,

Zhanghong Tang

It's an interesting question as to whether interval techniques are applicable to such large systems. The interval arithmetic approach has been on the go for roughly forty years and whileit looks good (theorems, lemmas, galore) on paper it's generally applied to much smaller toy problems (up to 12x12) than what you're dealing with. My current interest is in slightly larger systems, ca 100 or so. I've found that the triangularization of the highly stiff sparse matrices of concern speeds things up notably in Matlab and recent results of Rump et al

G.I. Hargreaves,

Interval Analysis in MATLAB, Numerical Analysis Report No. 416, available at

http://www.maths.man.ac.uk/ nareports/narep416.pdf

, 2002.

T. Ogita, S.M. Rump, and S.'I. Oishi, Accurate sum and dot product. SIAM Jl. Sci. Comput. 26, 1955-1988, 2005.

S.M. Rump, "INTLAB - INTerval LABoratory" in T. Csendes (ed.), Developments in Reliable Computing. Kluwer,

Dordrecht, Netherlands, 1999. Available at

http://www.ti3.tu-harburg.de/ rump/intlab/.

S.M. Rump and T. Ogita, Super-fast validated solution of linear systems. J. Comput. App. Math. 199, 199-206, 2006.

work very well with intervals tight enough that ||sup - inf||~100eps.

The forum is sci.math.num-analysis and not sci.math.numerical-analysis as I previously stated.

BTW, the Intel MKL library has an entire suite of interval linear solvers that are well worth looking at. Also, Sun has downloadable samples that you can run under MKL and IVF.

HTH,

Gerry

0 Kudos
Zhanghong_T_
Novice
433 Views

Hello Dr. Gerry,

Thank you very much for your kindly reply.

Now I attached the matrix into this message and it can be loaded by matlab:

load sparse;i=s11(:,1);j=s11(:,2);s=s11(:,3);

S=sparse(i,j,s);

Could anyone help me to analyze this matrix and is there any good precondition method to decrease the condition number of this matrix?

Thanks,

Zhanghong Tang

0 Kudos
Reply