Write a function nthroot that computes the nth root


Problem

Write a function nthRoot that computes the nth root (i.e. n==2 square root, n==3 cube root, etc) -- using the fact that the nth root of a number is the same as performing a power to 1/n -- NOTE: you have to use the ** operator instead of ^ when using floating point numbers for powers -- you'll also need fromIntegral to convert from integers to a floating point nthRoot :: Float -> Int -> Float nthRoot x n = error "TODO implement nthRoot".

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a function nthroot that computes the nth root
Reference No:- TGS03234865

Expected delivery within 24 Hours