inst/doc/hailstones.R

## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----setup, message = FALSE---------------------------------------------------
library(collatz)
# Optionally
library(gmp)

## -----------------------------------------------------------------------------
hailstone_sequence(5)

## -----------------------------------------------------------------------------
hailstone_sequence(5, total_stopping_time=FALSE)

## -----------------------------------------------------------------------------
hailstone_sequence(5, verbose=FALSE)

## -----------------------------------------------------------------------------
hailstone_sequence(-56)

## -----------------------------------------------------------------------------
hailstone_sequence(3, -1, 3, 1)

Try the collatz package in your browser

Any scripts or data that you put into this service are public.

collatz documentation built on Sept. 5, 2022, 9:06 a.m.