The code is running fine on online Standard ML of New Jersey v110.78 but showing error on unix SNL/NJ .93. here is the code
fun check( num:int ) =
let
val x = List.tabulate(num, fn x => x*x)
val k =tl(x)
val y = List.filter( fn z => num mod z = 0)k
val ans = List.last(y)
val final = Real.ceil(Math.sqrt (Real.fromInt ans))
in
final
end;
val nu = check(8)
Errors are Unbound constructor or variable in tabulate, filter, last, ceil and unbound structure for Math.