Skip to content

Commit

Permalink
added some missing decimal points
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang314 committed Jun 6, 2024
1 parent b802a0f commit f4069b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions herculens/Util/jax_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def R_omega(z, t, q, nmax):
@jit
def body_fun(i, val):
# Currrent term in the series is proportional to the previous
ratio = (2. * i + t - 2) / (2. * i - t + 2.)
ratio = (2. * i + t - 2.) / (2. * i - t + 2.)
val[1] = -f * ei2phi * ratio * val[1]
# Adds the current term to the partial sum
val[0] += val[1]
Expand Down Expand Up @@ -89,7 +89,7 @@ def omega_real(x, y, t, q, nmax):
Cs, Ss = jnp.cos(phi), jnp.sin(phi)
Cs2, Ss2 = jnp.cos(2 * phi), jnp.sin(2 * phi)
def update(n, val):
prefac = -f * (2 * n - (2 - t)) / (2 * n + (2 - t))
prefac = -f * (2. * n - (2. - t)) / (2. * n + (2. - t))
last_x, last_y, fx, fy = val
last_x, last_y = prefac * (Cs2 * last_x - Ss2 * last_y), prefac * (
Ss2 * last_x + Cs2 * last_y
Expand Down

0 comments on commit f4069b6

Please sign in to comment.