/* [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:
 * length(dvec4(-1.65lf, 1.33lf, 1.93lf, 0.76lf)) => 2.9654510618116765lf
 * length(dvec4(0.8lf, -0.15lf, -0.51lf, 0.0lf)) => 0.9605206921248496lf
 */
#version 150
#extension GL_ARB_gpu_shader_fp64 : require

void main()
{
  double[distance(length(dvec4(-1.65lf, 1.33lf, 1.93lf, 0.76lf)), 2.9654510618116765lf) <= 2.9654510618116767e-05lf ? 1 : -1] array0;
  double[distance(length(dvec4(0.8lf, -0.15lf, -0.51lf, 0.0lf)), 0.9605206921248496lf) <= 9.605206921248497e-06lf ? 1 : -1] array1;
  gl_FragColor = vec4(array0.length() + array1.length());
}
