Single precision floating point operation
Mostra commenti meno recenti
Hi I have done double precision floating point operations with matlab Now I have to do single precision. But I dont know how to do this in matlab what problem I am facing is suppose 1.234e50 this number is within range for double precision. But in case of single it is infinity so op1 = 2 op2 = 1.234e50 op1 / op2 = 1.620745542949757e-050 in case of double which i am getting directly. But in case of single precision it should be zero.
So in matlab is there any command through which we can set precision as single
Risposte (1)
Jos (10584)
il 10 Dic 2013
Use SINGLE to convert values to single precision
x = 1.234e50
z1 = 2/x
z2 = single(2/x)
whos
2 Commenti
seeker_123
il 10 Dic 2013
Walter Roberson
il 10 Dic 2013
x = single(1.234e50)
z1 = single(2)/x
Categorie
Scopri di più su Logical in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!