This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients gvanrossum, mark.dickinson
Date 2008-01-03.03:05:27
SpamBayes Score 0.01460599
Marked as misclassified No
Message-id <1199329528.16.0.77758330898.issue1725@psf.upfronthosting.co.za>
In-reply-to
Content
Tracing the calls through ast_for_factor -> ast_for_atom -> parsenumber -> PyOS_ascii_atof -> 
PyOS_ascii_strtod -> strtod, it looks as though the cause is simply that strtod behaves differently on 
the two platforms.  I get that the following code:

#include <stdio.h>
#include <stdlib.h>

int main() {
  char *fail_pos;
  double x;
  
  x = strtod("-1e-1000", &fail_pos);
  printf("Result: %f\n", x);

  return 0;
}

produces 0.000000 on Linux (SuSE 10.2) and -0.000000 on OS X 10.4.11.
History
Date User Action Args
2008-01-03 03:05:28mark.dickinsonsetspambayes_score: 0.014606 -> 0.01460599
recipients: + mark.dickinson, gvanrossum
2008-01-03 03:05:28mark.dickinsonsetspambayes_score: 0.014606 -> 0.014606
messageid: <1199329528.16.0.77758330898.issue1725@psf.upfronthosting.co.za>
2008-01-03 03:05:28mark.dickinsonlinkissue1725 messages
2008-01-03 03:05:27mark.dickinsoncreate