Xref: utzoo comp.os.vms:13816 comp.lang.pascal:1752 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!dogie.macc.wisc.edu!uwvax!tank!eecae!cps3xx!rang From: rang@cpsin3.cps.msu.edu (Anton Rang) Newsgroups: comp.os.vms,comp.lang.pascal Subject: VAX Pascal writeln on real numbers Summary: Small negative numbers show up as zero (OK, but...?) Keywords: pascal writeln rounding Message-ID: <2744@cps3xx.UUCP> Date: 26 Apr 89 18:21:27 GMT Sender: usenet@cps3xx.UUCP Reply-To: rang@cpswh.cps.msu.edu (Anton Rang) Organization: Michigan State University, Computer Science Dept. Lines: 16 I noticed that the rounding on small numbers done by writeln on VAX Pascal has a counter-intuitive (to me) result: writeln(-0.000001:6:4); ==> "0.0000" Somehow, it seems to me that "-0.0000" would make more sense (and it would make my report columns line up better :-). Rounding it to zero is correct, but I don't like losing the sign in the process.... Thoughts? +---------------------------+------------------------+---------------------+ | Anton Rang (grad student) | "VMS Forever!" | rec.music.newage is | | Michigan State University | rang@cpswh.cps.msu.edu | under discussion... | +---------------------------+------------------------+---------------------+