base.nbd {pbdBASE}R Documentation

Next Best Divisor

Description

Given integers n and d, with n>d, this function finds the "next best divisor" of n which is greater than or equal to d.

Usage

base.nbd(n, d)

Arguments

n

The divident (number divided into).

d

The candidate divisor.

Details

Suprisingly useful for thinking about processor grid shapes.

Examples

## Not run: 
library(pbdBASE, quiet = TRUE)
base.nbd(100, 10) # 10 divides 100, so 10 is returned
base.nbd(100, 11) # 11 does not, so the "next best" divisor, 20, is returned

## End(Not run)


[Package pbdBASE version 0.5-0 Index]