octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #44709] sprintf('%03g', 10) returns only 2 cha


From: John Donoghue
Subject: [Octave-bug-tracker] [bug #44709] sprintf('%03g', 10) returns only 2 char
Date: Fri, 03 Apr 2015 14:07:53 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #3, bug #44709 (project octave):

Creating a small c++ program:

#define _GNU_SOURCE
//#undef _GNU_SOURCE
#include <stdio.h>

int main()
{
  double d = 40;
  printf("d=%03g\n", d);
  return 0;
}



With define _GNU_SOURCE, in Linux prints 3 characters, in windows prints 2.
With the undef,  prints 3 characters for both Linux and windows.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44709>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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