Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Scientific exponential notation

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Scientific exponential notation

    Hi everyone,

    What's the easiest way to force a double to be displayed as scientific exponential?

    I've seen very complicated setups by using "printf" and a format string... but doesn't help. ;(

    Thanks!


  2. #2
    Super Moderator pbrockway2's Avatar
    Join Date
    Jan 2012
    Posts
    987
    Thanks
    6
    Thanked 206 Times in 182 Posts

    Default Re: Scientific exponential notation

    I would use printf(), as described in the Formatter API docs. But DecimalFormat can also be used.

Similar Threads

  1. Big-O Notation question
    By colerelm in forum Java Theory & Questions
    Replies: 1
    Last Post: November 28th, 2011, 09:52 PM
  2. [SOLVED] EVALUATION OF POSTFIX NOTATION
    By Medo Almasry in forum What's Wrong With My Code?
    Replies: 6
    Last Post: November 7th, 2011, 05:24 PM
  3. POSTFIX NOTATION USING STACKS... [EXAM IN 4 HRS HELP!!!]
    By Medo Almasry in forum What's Wrong With My Code?
    Replies: 7
    Last Post: October 23rd, 2011, 12:16 AM
  4. GUI Scientific Calculator. Please help! (Event Handling)
    By BlackGazer in forum What's Wrong With My Code?
    Replies: 1
    Last Post: July 9th, 2011, 07:14 AM
  5. Parsing Scientific Notation from String
    By aussiemcgr in forum Java Theory & Questions
    Replies: 7
    Last Post: December 14th, 2010, 09:45 AM