Is there a way to print at least 20 significant digits in an octave?

I need to print the result of a program with 20 significant digits, but I do not know how to print more than 15 digits (long format). Is there any way to achieve this?

+4
source share
1 answer

You can control the printf output format as in C by following this with these format specifiers :

 > printf('%.20f\n', pi) 3.14159265358979311600 
+6
source

All Articles