from double to single precision
52 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Beaya
am 27 Okt. 2013
Kommentiert: Azzi Abdelmalek
am 27 Okt. 2013
I want to calcute this equation x= 3.0*(4.0/3.0-1.0)-1.0 but using single precision instead of double. How do I do switch to single?
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 27 Okt. 2013
single(x)
3 Kommentare
Azzi Abdelmalek
am 27 Okt. 2013
x = 1 - 3*(4/3 - 1)
a=single(x)
whos x a
and see the difference
Azzi Abdelmalek
am 27 Okt. 2013
To get the smallest double and single number
realmin('double')
realmin('single')
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!