save -ascii produce garbage

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

save -ascii produce garbage

Craig Earls-2
I posted this to bug-octave, because I am pretty certainit is not
operator error. But maybe it is.

I am using g77-0.5.19, libc5.2.18, libg++2.7.1.4. I freshly recompiled
gcc, g77, and octave when I discovered this, on the off chance I hand a
library locale problem, there was no improvement.

Binary saves work correctly.

Repeat-By:
---------
Nebula:~# octave
Octave, version 2.0.1 (i686-pc-linux-gnu).
Copyright (C) 1996 John W. Eaton.
This is free software with ABSOLUTELY NO WARRANTY.
For details, type `warranty'.

octave:1> a=[0,1;3,4]
a =

  0  1
  3  4

octave:2> save -ascii test.asc a
octave:3> exit
Nebula:~# more test.asc
# name: a
# type: matrix
# rows: 2
# columns: 2
 -0e+3853 -6.8719493612338e+3868
 -6.88202553331772e+3868 -6.8853842573457e+3868
Nebula:~#


Reply | Threaded
Open this post in threaded view
|

save -ascii produce garbage

John W. Eaton-6
On 21-Jan-1997, Craig Earls <[hidden email]> wrote:

: I posted this to bug-octave, because I am pretty certainit is not
: operator error. But maybe it is.
:
: I am using g77-0.5.19, libc5.2.18, libg++2.7.1.4. I freshly recompiled
: gcc, g77, and octave when I discovered this, on the off chance I hand a
: library locale problem, there was no improvement.
:
: Binary saves work correctly.
:
: Repeat-By:
: ---------
: Nebula:~# octave
: Octave, version 2.0.1 (i686-pc-linux-gnu).
: Copyright (C) 1996 John W. Eaton.
: This is free software with ABSOLUTELY NO WARRANTY.
: For details, type `warranty'.
:
: octave:1> a=[0,1;3,4]
: a =
:
:   0  1
:   3  4
:
: octave:2> save -ascii test.asc a
: octave:3> exit
: Nebula:~# more test.asc
: # name: a
: # type: matrix
: # rows: 2
: # columns: 2
:  -0e+3853 -6.8719493612338e+3868
:  -6.88202553331772e+3868 -6.8853842573457e+3868

I can't reproduce this problem on a Linux system with

  * Linux kernel 2.0.6
  * gcc/g++ 2.7.2
  * g77 0.5.18
  * libg++/libstdc++ 2.7.1.0
  * libm 5.0.5
  * libc 5.2.18
  * libncurses 3.0
  * ld.so 1.7.14
  * binutils 2.6

I suspect that you have some library version mismatch.  Pretty much
all I know about this kind of problem is in the file

  ftp://ftp.che.wisc.edu/octave/README.Linux

Please note that I am NOT recommending that everyone running Linux and
using Octave should install the same versions of the libraries and
compilers that I have.  I am simply saying that the versions listed
above work for me.  Other version combinations may also work, but I
don't have time to map out all the possibilities...

jwe

Reply | Threaded
Open this post in threaded view
|

Re: save -ascii produce garbage

Mario Storti-3
In reply to this post by Craig Earls-2

> I posted this to bug-octave, because I am pretty certainit is not
> operator error. But maybe it is.
>
> I am using g77-0.5.19, libc5.2.18, libg++2.7.1.4. I freshly recompiled
> gcc, g77, and octave when I discovered this, on the off chance I hand a
> library locale problem, there was no improvement.
(...)

> octave:3> exit
> Nebula:~# more test.asc
> # name: a
> # type: matrix
> # rows: 2
> # columns: 2
>  -0e+3853 -6.8719493612338e+3868
>  -6.88202553331772e+3868 -6.8853842573457e+3868
> Nebula:~#
>

I reported  the same on Nov 12,  and it seemed to  me that it was some
kind   of   inconsistency in  the libraries.    Finally, I installed a
statically linked version.

Mario

%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%
Mario Alberto Storti               | Fax: (54)(42) 55.09.44               |
Grupo de Tecnologia Mecanica       | Tel: (54)(42) 55.91.75               |
INTEC, Guemes 3450 - 3000 Santa Fe | http://venus.unl.edu.ar/gtm-eng.html |
Argentina                          | Home: Gob. Vera 3161                 |
Reply: [hidden email]  |       (54)(42) 55.00.23              |