Logarithm Function Reverse Mode Theory
Keywords: logarithm function reverse mode theory log1p

| Prev | Next |  |  |  |  |  | log_reverse | Headings

Logarithm Function Reverse Mode Theory
We use the reverse theory standard math function definition for the functions H and G . The zero order forward mode formula for the logarithm is z ( 0 ) = F ( x ( 0 ) ) and for j > 0 , z ( j ) = 1 b ¯ + x ( 0 ) 1 j (j x ( j ) - ∑ k = 1 j -1 k z ( k ) x ( j - k ) ) where b ¯ = { 0 if F ( x ) = log ( x ) 1 if F ( x ) = log 1 p ( x ) We note that for j > 0 ∂ z ( j ) ∂ x ( 0 ) = - 1 b ¯ + x ( 0 ) 1 b ¯ + x ( 0 ) 1 j (j x ( j ) - ∑ k = 1 j -1 k z ( k ) x ( j - k ) ) = - z ( j ) b ¯ + x ( 0 ) Removing the zero order partials are given by ∂ H ∂ x ( 0 ) = ∂ G ∂ x ( 0 ) + ∂ G ∂ z ( 0 ) ∂ z ( 0 ) ∂ x ( 0 ) = ∂ G ∂ x ( 0 ) + ∂ G ∂ z ( 0 ) 1 b ¯ + x ( 0 ) For orders j > 0 and for k = 1 , … , j -1 ∂ H ∂ x ( 0 ) = ∂ G ∂ x ( 0 ) + ∂ G ∂ z ( j ) ∂ z ( j ) ∂ x ( 0 ) = ∂ G ∂ x ( 0 ) - ∂ G ∂ z ( j ) z ( j ) b ¯ + x ( 0 ) ∂ H ∂ x ( j ) = ∂ G ∂ x ( j ) + ∂ G ∂ z ( j ) ∂ z ( j ) ∂ x ( j ) = ∂ G ∂ x ( j ) + ∂ G ∂ z ( j ) 1 b ¯ + x ( 0 ) ∂ H ∂ x ( j - k ) = ∂ G ∂ x ( j - k ) - ∂ G ∂ z ( j ) 1 b ¯ + x ( 0 ) k j z ( k ) ∂ H ∂ z ( k ) = ∂ G ∂ z ( k ) - ∂ G ∂ z ( j ) 1 b ¯ + x ( 0 ) k j x ( j - k )

Input File: omh/theory/log_reverse.omh