# The function that returns the montgomery decomposition
#' Title
#'
#' @param x
#' @param y
#'
#' @return
#' @export
#'
#' @examples
logDiv <- function(x,y ){
stopifnot(!any(x>0 & y<0),
!any(x<0 & y>0)) # x and y must have the same sign!
x[x==0]<- ifelse(y[x==0]>=0,
+.Machine$double.eps,
-.Machine$double.eps)
y[y==0]<- ifelse(x[y==0]>=0,
+.Machine$double.eps,
-.Machine$double.eps)
stopifnot(!any(c(any(x==0),
any(y==0),
any(x>0 & y<0),
any(x<0 & y>0))
))
return(log(x/y))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.