/* [config]
 * expect_result: pass
 * glsl_version: 1.50
 * require_extensions: GL_ARB_gpu_shader_fp64
 * [end config]
 *
 * Check that the following test vectors are constant folded correctly:
 * mix(-2.0lf, -3.0lf, true) => -3.0lf
 * mix(-2.0lf, -3.0lf, false) => -2.0lf
 * mix(-2.0lf, 3.0lf, true) => 3.0lf
 * mix(-2.0lf, 3.0lf, false) => -2.0lf
 * mix(2.0lf, -3.0lf, true) => -3.0lf
 * mix(2.0lf, -3.0lf, false) => 2.0lf
 * mix(2.0lf, 3.0lf, true) => 3.0lf
 * mix(2.0lf, 3.0lf, false) => 2.0lf
 */
#version 150
#extension GL_ARB_gpu_shader_fp64 : require

void main()
{
  double[distance(mix(-2.0lf, -3.0lf, true), -3.0lf) <= 3.0000000000000004e-05lf ? 1 : -1] array0;
  double[distance(mix(-2.0lf, -3.0lf, false), -2.0lf) <= 2e-05lf ? 1 : -1] array1;
  double[distance(mix(-2.0lf, 3.0lf, true), 3.0lf) <= 3.0000000000000004e-05lf ? 1 : -1] array2;
  double[distance(mix(-2.0lf, 3.0lf, false), -2.0lf) <= 2e-05lf ? 1 : -1] array3;
  double[distance(mix(2.0lf, -3.0lf, true), -3.0lf) <= 3.0000000000000004e-05lf ? 1 : -1] array4;
  double[distance(mix(2.0lf, -3.0lf, false), 2.0lf) <= 2e-05lf ? 1 : -1] array5;
  double[distance(mix(2.0lf, 3.0lf, true), 3.0lf) <= 3.0000000000000004e-05lf ? 1 : -1] array6;
  double[distance(mix(2.0lf, 3.0lf, false), 2.0lf) <= 2e-05lf ? 1 : -1] array7;
  gl_Position = vec4(array0.length() + array1.length() + array2.length() + array3.length() + array4.length() + array5.length() + array6.length() + array7.length());
}
