Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nx/lib/nx.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5789,7 +5789,7 @@ defmodule Nx do
@doc """
Calculates the complex conjugate of each element in the tensor.

If $z = a + bi = r e^\\theta$, $conjugate(z) = z^* = a - bi = r e^{-\\theta}$
If $$z = a + bi = r e^\\theta$$, $$conjugate(z) = z^* = a - bi = r e^{-\\theta}$$

## Examples

Expand Down Expand Up @@ -5820,7 +5820,7 @@ defmodule Nx do

@doc """
Calculates the complex phase angle of each element in the tensor.
$phase(z) = atan2(b, a), z = a + bi \\in \\Complex$
$$phase(z) = atan2(b, a), z = a + bi \\in \\Complex$$

## Examples

Expand Down
4 changes: 2 additions & 2 deletions nx/lib/nx/shared.ex
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ defmodule Nx.Shared do
log:
{"natural log", quote(do: Complex.ln(var!(x))),
~S"""
$log(z) = ln(z),\quad \text{if z} \in \Reals$
$$log(z) = ln(z),\quad \text{if z} \in \Reals$$

$log(z) = ln(r) + i\theta,\quad\text{if }z = re^{i\theta} \in \Complex$
$$log(z) = ln(r) + i\theta,\quad\text{if }z = re^{i\theta} \in \Complex$$
"""},
log1p:
{"natural log plus one", quote(do: Complex.ln(Complex.add(var!(x), 1))),
Expand Down