[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53167] format long doesn't adjust precision t

From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #53167] format long doesn't adjust precision to 7 digits when displaying single() values
Date: Mon, 19 Feb 2018 19:31:21 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #5, bug #53167 (project octave):

The following is essentially what Octave does now when you set
output_precision to 75:

#include <cmath>
#include <iomanip>
#include <iostream>

main (void)
  std::cout.flags (std::ios::showpoint);
  std::cout << std::setprecision (70) << std::setw (75) << M_PI << std::endl;
  return 0;

On my system, this prints:


I believe this is the same as

#include <math.h>
#include <stdio.h>

main (void)
  printf ("%80.75f\n", M_PI);
  return 0;

Maybe it's stupid, but when these format functions were originally written for
Octave, I think the aim was to allow this kind of formatting.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]