|
From: | Rik |
Subject: | [Octave-bug-tracker] [bug #56926] "format long g" does not adjust precision when variable is of type single |
Date: | Fri, 20 Sep 2019 14:52:18 -0400 (EDT) |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
URL: <https://savannah.gnu.org/bugs/?56926> Summary: "format long g" does not adjust precision when variable is of type single Project: GNU Octave Submitted by: rik5 Submitted on: Fri 20 Sep 2019 11:52:16 AM PDT Category: Interpreter Severity: 2 - Minor Priority: 5 - Normal Item Group: Matlab Compatibility Status: Confirmed Assigned to: None Originator Name: Originator Email: Open/Closed: Open Discussion Lock: Any Release: dev Operating System: Any _______________________________________________________ Details: Example session showing that only the format "long g" fails to truncate precision. octave:1> x = single (pi(1,3)) x = 3.1416 3.1416 3.1416 octave:2> format long octave:3> x x = 3.1415927 3.1415927 3.1415927 octave:4> format long g octave:5> x x = 3.141592741012573 3.141592741012573 3.141592741012573 octave:6> format long e octave:7> x x = 3.1415927e+00 3.1415927e+00 3.1415927e+00 octave:8> double (x) ans = 3.141592741012573e+00 3.141592741012573e+00 3.141592741012573e+00 _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?56926> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |