Skip to content

Commit

Permalink
use sqrtf to avoid cast to double
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Mar 21, 2024
1 parent def387c commit 707d284
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stcal/ramp_fitting/ols_cas22/_jump.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fit_jumps : function
"""

from cython cimport boundscheck, cdivision, wraparound
from libc.math cimport NAN, fmaxf, isnan, log10, sqrt
from libc.math cimport NAN, fmaxf, isnan, log10, sqrtf
from libcpp cimport bool

from stcal.ramp_fitting.ols_cas22._jump cimport JUMP_DET, FixedOffsets, JumpFits, PixelOffsets, Thresh
Expand Down Expand Up @@ -291,7 +291,7 @@ cdef inline float _statstic(float local_slope,
cdef float delta = local_slope - slope
cdef float var = (var_read_noise + slope * var_slope_coeff) / t_bar_diff_sqr

return delta / sqrt(var + correct)
return delta / sqrtf(var + correct)


@boundscheck(False)
Expand Down

0 comments on commit 707d284

Please sign in to comment.