Skip to content
Snippets Groups Projects
Commit f394936c authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

R123: Apparently Mako templates don't use from future import division

parent c4b5ce47
No related branches found
No related tags found
No related merge requests found
...@@ -129,7 +129,7 @@ float${ width } ${ name }_f32( ...@@ -129,7 +129,7 @@ float${ width } ${ name }_f32(
*new_ctr = ctr; *new_ctr = ctr;
return return
convert_float${ width }(${ name }_gen(*new_ctr, key, new_ctr)) convert_float${ width }(${ name }_gen(*new_ctr, key, new_ctr))
* ${ repr(1/2**32) }f; * ${ repr(1./2**32) }f;
} }
double${ width } ${ name }_f64( double${ width } ${ name }_f64(
...@@ -141,16 +141,16 @@ double${ width } ${ name }_f64( ...@@ -141,16 +141,16 @@ double${ width } ${ name }_f64(
%if rng_variant.bits == 32: %if rng_variant.bits == 32:
return return
convert_double${ width }(${ name }_gen(*new_ctr, key, new_ctr)) convert_double${ width }(${ name }_gen(*new_ctr, key, new_ctr))
* ${ repr(1/2**32) } * ${ repr(1./2**32) }
+ +
convert_double${ width }(${ name }_gen(*new_ctr, key, new_ctr)) convert_double${ width }(${ name }_gen(*new_ctr, key, new_ctr))
* ${ repr(1/2**64) }; * ${ repr(1./2**64) };
%elif rng_variant.bits == 64: %elif rng_variant.bits == 64:
*new_ctr = ctr; *new_ctr = ctr;
return return
convert_double${ width }(${ name }_gen(*new_ctr, key, new_ctr)) convert_double${ width }(${ name }_gen(*new_ctr, key, new_ctr))
* ${ repr(1/2**64) }; * ${ repr(1./2**64) };
%else: %else:
#error Unrecognized bit width in RNG #error Unrecognized bit width in RNG
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment