Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I notice the values I get from octave are rounded to 5 decimal places. How can I increase that to 6 or 8 for example?

share|cite|improve this question
At the octave command prompt, type format long – William DeMeo Mar 14 '12 at 4:15
Googling "octave precision digits" yielded this as the 7th hit, and the one in which the brief "blurb" in Google page suggested a match. I know absolutely nothing about octave, so I can't vouch for the answer, but it does lead me to wonder... did you try googling? – Arturo Magidin Mar 14 '12 at 4:15
up vote 11 down vote accepted

As noted by William DeMeo in the comments, the command format is what you're looking for. In fact, format is common to both Matlab and Octave.

The command is

format options where options are: short for 3 significant figures, long for 15 significant figures, long e (or E) and short e (or E) for using scientific notation ...

More is in manual here link

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.