Re: yasq

From: hiwa (HGA03630_at_nifty.ne.jp)
Date: 01/17/04

  • Next message: Tony Morris: "Re: Hello World"
    Date: 16 Jan 2004 17:20:01 -0800
    
    

    "martin" <nobody@nowhere.org> wrote in message news:<bu97u9$cqg$1@reader11.wxs.nl>...
    > ... = yet another simple question. ;-))
    >
    > when I have -for example- a 'double' variable with value
    > 231.6847987639475639876478 etc...
    >
    > How can I have it printed on screen as 231.685 ?
    > or as 2.3e+2 ?
    >
    > in general: How can I set the format in which floats (or other var's) are
    > printed on screen?
    >
    > thanx in advance!
    > martin

    Use java.text.DecimalFormat. Its usage is quite simple and easy.


  • Next message: Tony Morris: "Re: Hello World"

    Relevant Pages

    • Excel does not claculate
      ... So we do both have Excel's that work alike. ... Cell is set to General ... Martin Verville ... Format to General or Number then copy an empty cell. ...
      (microsoft.public.excel.misc)
    • Re: Converting bits to FLOAT
      ... >> I'm parsing TIFF images in Lisp, and some of the bitfields in the image can ... >> contain floats, packed in IEEE format. ... >> rationals, etc.), but can't figure out what to do for floats. ...
      (comp.lang.lisp)
    • Re: Convert Storable files between platforms?
      ... >> My problem is that the server where I run the script recently crashed. ... of floats: a non-network-order Storable file has floats stored in raw ... native format, and I doubt they are the same on Alpha and Opteron. ...
      (comp.lang.perl.misc)
    • Re: Question about audio artifacts; WMA vs. MP3
      ... Why can't MP3 ... In its earlier life as Cool Edit Pro, the designers "invented" a scurrilous pseudo-floating-point file format which in terms of the header was identical to an integer format - they deduced it was floats by inspecting the samples. ... All that remains is for some floating-point numerical errors to creep in, ...
      (comp.dsp)
    • Re: Whats wrong with this code?
      ... LOOP MAXIMIZE is specified to work as "if by the function MAX". ... the suspect is contagion permitted by the spec ... largest format of any float argument, ... point contagion if you had double floats and single floats. ...
      (comp.lang.lisp)