Article View: net.lang.c
Article #9286Using SCANF with DOUBLE precision variables...
From: DAVE%UWF.BITNET
Date: Tue, 09 Sep 1986 19:57
Date: Tue, 09 Sep 1986 19:57
13 lines
1230 bytes
1230 bytes
'Ello,
I've been doing a little matrix algebra in C lately, and in the process
I have been wanting to read in some real numbers, preferably thru SCANF, but I
get nothing but 0.000 returned when i try to put the result of a SCANF in a var
declared as DOUBLE. The only thing that I could think of was either writing my
own algorithm, or reading the number in as FLOAT and storing it in the DOUBLE
variable. Perchance someone else has had this problem and found a better
solution without re-inventing several wheels? I guess there really isn't any
reason why I just couldn't use FLOAT variables, but then there shouldn't be any
reason why I can't use SCANF on DOUBLE vars either.
Thanks in advance,
Dave
Technical Details
Message-ID:
<3672@brl-smoke.ARPA>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!brl-adm!brl-smoke!smoke!DAVE%UWF.BITNET@WISCVM.WISC.EDUShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!brl-adm!brl-smoke!smoke!DAVE%UWF.BITNET@WISCVM.WISC.EDU From: DAVE%UWF.BITNET@WISCVM.WISC.EDU Newsgroups: net.lang.c Subject: Using SCANF with DOUBLE precision variables... Message-ID: <3672@brl-smoke.ARPA> Date: Tue, 9-Sep-86 15:57:26 EDT Article-I.D.: brl-smok.3672 Posted: Tue Sep 9 15:57:26 1986 Date-Received: Wed, 10-Sep-86 07:12:10 EDT Sender: news@brl-smoke.ARPA Lines: 13