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

  • SEARCH
  • Home
  • 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 9199815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:37:20+00:00 2026-06-17T22:37:20+00:00

If you put the following into App Engine Shell you get ‘50.49’ . This

  • 0

If you put the following into App Engine Shell you get '50.49'. This result is consistent on both the 2.5 and 2.7 runtimes.

 >> a = '%0.2f' % (round(float(u'50.485'), 2),)
 >> a
'50.49'

However if I put the same thing into my local MacBook Pro running python 2.7.1 I get '50.48'.

 >> a = '%0.2f' % (round(float(u'50.485'), 2),)
 >> a
'50.48'

Why is this different and how can I get consistency between my local machine and App Engine’s servers?

  • 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-06-17T22:37:22+00:00Added an answer on June 17, 2026 at 10:37 pm

    Apparently, Google App Engine uses “float” C type (IEEE 754 single precision), while local Python uses “double” instead (IEEE 754 double precision).

    I have suspected that CPython has a configure switch to use ‘float’ instead of ‘double’, but haven’t found one.

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

Sidebar

Related Questions

I am attempting to put the following functionality into an iOS app I am
I put the following into Ideone.com (and codepad.org): #include <iostream> #include <string> #include <tr1/functional>
I am trying to put the following code into VBA. What I ideally want
The following jQuery example should put some text into the div, but it doesn't.
I tried the following code tree. If I put the header file hello.h into
I put together the following method, which calls my repository to get an image
I have a Rails 3 app that I am turning into a Rails engine
I'm maintaining a vb6 project(ActiveX DLL). When debugging, the app run into the following
I'm trying to look into wxPython and sizers, and I put together the following
Hi i have written the following code to download images into my app. public

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.