double cbrt(double x) { if (x < 0) return -math.pow(-x, 1.0 / 3.0).toDouble(); return math.pow(x, 1.0 / 3.0).toDouble(); }