2 * Copyright 2010 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
8 * Test basic floating point operations
14 #define NUM_ARRAY_ELEMENTS 3
16 float Numbers1[NUM_ARRAY_ELEMENTS] = {0.5, 0.3, 0.2};
19 int main(int argc, char* argv[]) {
23 /* This will not happen but helps confusing the optimizer */
25 for (i = 0; i < NUM_ARRAY_ELEMENTS; ++i) {
26 Numbers1[i] = (float) argv[i][0];
30 /* actual computation */
32 for (i = 0; i < NUM_ARRAY_ELEMENTS; ++i) {
36 assert (fabs (sum - 1.) < 0.001);