package androidx.core.content.res;

/* JADX INFO: compiled from: ViewingConditions.java */
/* JADX INFO: loaded from: classes.dex */
final class l {

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    static final l f1672k = k(b.f1638c, (float) ((((double) b.h(50.0f)) * 63.66197723675813d) / 100.0d), 50.0f, 2.0f, false);

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private final float f1673a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private final float f1674b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private final float f1675c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    private final float f1676d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    private final float f1677e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    private final float f1678f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    private final float[] f1679g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    private final float f1680h;

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    private final float f1681i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    private final float f1682j;

    private l(float f3, float f4, float f5, float f6, float f7, float f8, float[] fArr, float f9, float f10, float f11) {
        this.f1678f = f3;
        this.f1673a = f4;
        this.f1674b = f5;
        this.f1675c = f6;
        this.f1676d = f7;
        this.f1677e = f8;
        this.f1679g = fArr;
        this.f1680h = f9;
        this.f1681i = f10;
        this.f1682j = f11;
    }

    static l k(float[] fArr, float f3, float f4, float f5, boolean z2) {
        float[][] fArr2 = b.f1636a;
        float f6 = (fArr[0] * fArr2[0][0]) + (fArr[1] * fArr2[0][1]) + (fArr[2] * fArr2[0][2]);
        float f7 = (fArr[0] * fArr2[1][0]) + (fArr[1] * fArr2[1][1]) + (fArr[2] * fArr2[1][2]);
        float f8 = (fArr[0] * fArr2[2][0]) + (fArr[1] * fArr2[2][1]) + (fArr[2] * fArr2[2][2]);
        float f9 = (f5 / 10.0f) + 0.8f;
        float fD = ((double) f9) >= 0.9d ? b.d(0.59f, 0.69f, (f9 - 0.9f) * 10.0f) : b.d(0.525f, 0.59f, (f9 - 0.8f) * 10.0f);
        float fExp = z2 ? 1.0f : (1.0f - (((float) Math.exp(((-f3) - 42.0f) / 92.0f)) * 0.2777778f)) * f9;
        double d3 = fExp;
        if (d3 > 1.0d) {
            fExp = 1.0f;
        } else if (d3 < 0.0d) {
            fExp = 0.0f;
        }
        float[] fArr3 = {(((100.0f / f6) * fExp) + 1.0f) - fExp, (((100.0f / f7) * fExp) + 1.0f) - fExp, (((100.0f / f8) * fExp) + 1.0f) - fExp};
        float f10 = 1.0f / ((5.0f * f3) + 1.0f);
        float f11 = f10 * f10 * f10 * f10;
        float f12 = 1.0f - f11;
        float fCbrt = (f11 * f3) + (0.1f * f12 * f12 * ((float) Math.cbrt(((double) f3) * 5.0d)));
        float fH = b.h(f4) / fArr[1];
        double d4 = fH;
        float fSqrt = ((float) Math.sqrt(d4)) + 1.48f;
        float fPow = 0.725f / ((float) Math.pow(d4, 0.2d));
        float[] fArr4 = {(float) Math.pow(((double) ((fArr3[0] * fCbrt) * f6)) / 100.0d, 0.42d), (float) Math.pow(((double) ((fArr3[1] * fCbrt) * f7)) / 100.0d, 0.42d), (float) Math.pow(((double) ((fArr3[2] * fCbrt) * f8)) / 100.0d, 0.42d)};
        float[] fArr5 = {(fArr4[0] * 400.0f) / (fArr4[0] + 27.13f), (fArr4[1] * 400.0f) / (fArr4[1] + 27.13f), (fArr4[2] * 400.0f) / (fArr4[2] + 27.13f)};
        return new l(fH, ((fArr5[0] * 2.0f) + fArr5[1] + (fArr5[2] * 0.05f)) * fPow, fPow, fPow, fD, f9, fArr3, fCbrt, (float) Math.pow(fCbrt, 0.25d), fSqrt);
    }

    float a() {
        return this.f1673a;
    }

    float b() {
        return this.f1676d;
    }

    float c() {
        return this.f1680h;
    }

    float d() {
        return this.f1681i;
    }

    float e() {
        return this.f1678f;
    }

    float f() {
        return this.f1674b;
    }

    float g() {
        return this.f1677e;
    }

    float h() {
        return this.f1675c;
    }

    float[] i() {
        return this.f1679g;
    }

    float j() {
        return this.f1682j;
    }
}
