class Polynomial implements IReadDataBlock {

    public static Polynomial valueOf(double firstCoefficient, double... nextCoefficients) {
        if (Arrays2.isNullOrEmpty(nextCoefficients)) {
            if (firstCoefficient == 0.0) {
                return Polynomial.ZERO;
            }
            if (firstCoefficient == 1.0) {
                return Polynomial.ONE;
            }
            return new Polynomial(new double[]{firstCoefficient}, 0);
        }
        double[] result = Doubles.fromDegree(nextCoefficients.length);
        result[0] = firstCoefficient;
        System.arraycopy(nextCoefficients, 0, result, 1, nextCoefficients.length);
        return new Polynomial(result, Doubles.getUsedDegree(result));
    }

    private  Polynomial(final double[] coefficients, final int degree);

}