Problem Statement
Problem Description
You are given a real number x. Your task is to evaluate the following piecewise function f(x):
- Case 1: If
x < -1, thenf(x) = x² - 3x + 2 - Case 2: If
-1 ≤ x ≤ 3, thenf(x) = 2x + 5 - Case 3: If
x > 3, thenf(x) = x³ - 10
Based on the value of x, determine which case applies and compute the corresponding function value.
Examples
- For input
-2, the output is12.00(Case 1) - For input
4, the output is54.00(Case 3) - For input
0, the output is5.00(Case 2)