Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stackplot_test_baseline has different results on 32-bit and 64-bit platforms #1726

Merged
merged 1 commit into from Feb 4, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/_path.cpp
Expand Up @@ -1159,14 +1159,24 @@ _path_module::affine_transform(const Py::Tuple& args)
size_t stride1 = PyArray_STRIDE(vertices, 1);
double x;
double y;
volatile double t0;
volatile double t1;
volatile double t;

for (size_t i = 0; i < n; ++i)
{
x = *(double*)(vertex_in);
y = *(double*)(vertex_in + stride1);

*vertex_out++ = a * x + c * y + e;
*vertex_out++ = b * x + d * y + f;
t0 = a * x;
t1 = c * y;
t = t0 + t1 + e;
*(vertex_out++) = t;

t0 = b * x;
t1 = d * y;
t = t0 + t1 + f;
*(vertex_out++) = t;

vertex_in += stride0;
}
Expand Down