Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7685597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:17:11+00:00 2026-05-31T19:17:11+00:00

According to the docs String text = String.format(%5.1e, 3.1415f); Should produce something like 3.1E+00

  • 0

According to the docs

String text = String.format("%5.1e", 3.1415f);

Should produce something like

3.1E+00

On my emulator it is as expected

3.1E+00

On my dev phone it shows as

3.1*10^+00

Which makes it useless for all practical purposes.

The Android documentation does not tell me much about localization but the Oracle docs only mentions localized formatting of the first part “3.1”.

Is there a simple way to get consistent formatting?

Is this documented behaviour? a bug?

A HTC Nexus One gives the odd behaviour, a Samsung Galaxy Nexus gives the proper behaviour.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:17:12+00:00Added an answer on May 31, 2026 at 7:17 pm

    It sounds like it’s an issue of the N1, or in the version of Android that the N1 is running. One option would be to grab the code from somewhere you know it works, and copy to your own formatter for scientific numbers.

    Looking at the source for java.util.Formatter, take a look at this print() method. This seems to be where the magic happens.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to the docs , the builtin string encoding string_escape : Produce[s] a string
According to the iBatis docs , using byte? as a type value should work
According to http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Class.html#getDeclaredMethods%28%29 , Class.getDeclaredMethods() should only include methods declared by the class. However,
I'm using a System.Windows.Forms.TextBox . According to the docs, the MaxLength property controls the
According to the gcc docs , memcmp is not an intrinsic function of GCC.
According to the Thinking Sphinx docs ... Turning on delta indexing does not remove
According to the Qt docs, it Prepares the item for a geometry change. Call
according to the official docs there are two options to create parallel collections: 1)
According to the Python 2.6.5 docs [1], the bsddb module has been deprecated for
According to http://lipas.uwasa.fi/~ts/info/proctips.html#orrules , you can make basic or rules in .procmailrc with something

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.