Wilkinson's polynomial

wilkinson(x, w = 20)

Arguments

x

the x-value

w

the number of terms in the polynomial

Value

the value of the function at x

Details

Wilkinson's polynomail is a terrible joke played on numerical analysis. By tradition, the function is f(x) = (x - 1)(x - 2)...(x - 20), giving a function with real roots at each integer from 1 to 20. This function is generalized and allows for n and the function value is f(x) = (x - 1)(x - 2)...(x - n). The default of n is 20.

Examples

wilkinson(0)
#> [1] 2.432902e+18