Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Remove lib imports from examples"

This reverts commit 9e160f2.

Conflicts:

	examples/shootout/spectralnorm/spectralnorm.clay
  • Loading branch information...
commit 4cb5a27308d450343b0efc18fc65ad5f9ca87c58 1 parent 66b8b9d
Jeremy Clifford authored
View
1  examples/libchello.clay
@@ -1,3 +1,4 @@
+import libc;
main() {
libc.printf(cstring("Hello!\n"));
View
1  examples/shootout/spectralnorm/spectralnorm.clay
@@ -3,6 +3,7 @@ import math.*;
import numbers.parser.*;
import io.files.(stdout);
import io.streams.(write);
+import libc;
A(i, j) = 1.0 / Float64(((i+j) * (i+j+1)\2) + i + 1);
View
4 examples/shootout/spectralnorm/spectralnorm_non_simd.clay
@@ -1,4 +1,6 @@
import printer.(println);
+import libc;
+import math.(sqrt);
A(i, j) = 1.0 / Double(((i+j) * (i+j+1)\2) + i + 1);
@@ -46,7 +48,7 @@ approximate(k) {
vbv +: h[i] * g[i];
vv +: g[i] * g[i];
}
- return libc.sqrt(vbv / vv);
+ return sqrt(vbv / vv);
}
printFloat(stream, fmt, value) {
Please sign in to comment.
Something went wrong with that request. Please try again.