Skip to content

Commit

Permalink
Replace pow with inline power ** 2
Browse files Browse the repository at this point in the history
Co-authored-by: Paulo Valente <[email protected]>
  • Loading branch information
christianjgreen and polvalente authored Dec 29, 2024
1 parent 7428fb8 commit 4899d0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nx/lib/eigh_block.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defmodule Nx.LinAlg.BlockEigh do
s_tr = Nx.select(z_tr, 1, tr)
tau = Nx.select(z_tr, 0, (br - tl) / (2 * s_tr))

t = Nx.sqrt(1 + Nx.pow(tau, 2))
t = Nx.sqrt(1 + tau ** 2)

t = 1 / (tau + Nx.select(tau >= 0, t, -t))

Expand Down

0 comments on commit 4899d0a

Please sign in to comment.