spear-kernels 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.cjs +252 -252
  2. package/index.js +252 -252
  3. package/package.json +1 -1
package/index.cjs CHANGED
@@ -6,8 +6,8 @@ const kernels = {
6
6
  precise: {
7
7
  js: "((x) => ((0.997587 * (x * (0.501 + (0.587 * Math.min(1e4, Math.max(-1e4, (x) / (((0.815 + Math.sqrt(Math.abs((0.909361 + (x) * (x)))))) < 1e-4 && ((0.815 + Math.sqrt(Math.abs((0.909361 + (x) * (x)))))) > -1e-4 ? (((0.815 + Math.sqrt(Math.abs((0.909361 + (x) * (x)))))) >= 0 ? 1e-4 : -1e-4) : ((0.815 + Math.sqrt(Math.abs((0.909361 + (x) * (x))))))))))))) + -0.005749))",
8
8
  eval: ((x) => ((0.997587 * (x * (0.501 + (0.587 * Math.min(1e4, Math.max(-1e4, (x) / (((0.815 + Math.sqrt(Math.abs((0.909361 + (x) * (x)))))) < 1e-4 && ((0.815 + Math.sqrt(Math.abs((0.909361 + (x) * (x)))))) > -1e-4 ? (((0.815 + Math.sqrt(Math.abs((0.909361 + (x) * (x)))))) >= 0 ? 1e-4 : -1e-4) : ((0.815 + Math.sqrt(Math.abs((0.909361 + (x) * (x))))))))))))) + -0.005749)),
9
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.997587f * (x * (0.501f + (0.587f * fminf(fmaxf((x / copysignf(fmaxf(fabsf((0.815f + sqrtf(fabsf((0.909361f + powf(x, 2.0f)))))), 1.0e-4f), (0.815f + sqrtf(fabsf((0.909361f + powf(x, 2.0f))))))), -1.0e4f), 1.0e4f))))) + -0.005749f);\n}",
10
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.997587 * (x * (0.501 + (0.587 * (x / (abs((0.815 + torch.sqrt(torch.abs((0.909361 + (x * x)))))) < 1e-4 ? 1e-4 : (0.815 + torch.sqrt(torch.abs((0.909361 + (x * x))))))))))) + -0.005749)",
9
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.997587f * (x * (0.501f + (0.587f * fminf(fmaxf((x / copysignf(fmaxf(fabsf((0.815f + sqrtf(fabsf((0.909361f + powf(x, 2.0f)))))), 1.0e-4f), (0.815f + sqrtf(fabsf((0.909361f + powf(x, 2.0f))))))), -1.0e4f), 1.0e4f))))) + -0.005749f);\n}",
10
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.997587 * (x * (0.501 + (0.587 * (x / (abs((0.815 + torch.sqrt(torch.abs((0.909361 + (x * x)))))) < 1e-4 ? 1e-4 : (0.815 + torch.sqrt(torch.abs((0.909361 + (x * x))))))))))) + -0.005749)",
11
11
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACokBAYYBAESmRX2SO+zvPyAARNV46SYxCOA/RGIQWDm0yOI/IABEFK5H4XoU6j9EW0BoPXwZ7T8gACAAoqCZn6CZRC1DHOviNho/pUQUrkfhehTqP0RbQGg9fBntPyAAIACioJmfoKajRAAAAAAAiMPApUQAAAAAAIjDQKSioKKiRPtYwW9DjHe/oAs=",
12
12
  },
13
13
  meta: {
@@ -24,8 +24,8 @@ const kernels = {
24
24
  precise: {
25
25
  js: "((x) => ((0.997729 * (x * Math.min(1.002, Math.max(0, ((0.306923 * x) + 0.501))))) + -0.004004))",
26
26
  eval: ((x) => ((0.997729 * (x * Math.min(1.002, Math.max(0, ((0.306923 * x) + 0.501))))) + -0.004004)),
27
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.997729f * (x * fminf(1.002f, fmaxf(0.0f, ((0.306923f * x) + 0.501f))))) + -0.004004f);\n}",
28
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.997729 * (x * torch.minimum(1.002, torch.relu(((0.306923 * x) + 0.501))))) + -0.004004)",
27
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.997729f * (x * fminf(1.002f, fmaxf(0.0f, ((0.306923f * x) + 0.501f))))) + -0.004004f);\n}",
28
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.997729 * (x * torch.minimum(1.002, torch.relu(((0.306923 * x) + 0.501))))) + -0.004004)",
29
29
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACkUBQwBEQ6ooXmXt7z8gAETVeOkmMQjwP0Qr+dhdoKTTPyAAokTVeOkmMQjgP6BEAAAAAAAAAAClpKKiRHfX2ZB/ZnC/oAs=",
30
30
  },
31
31
  meta: {
@@ -42,15 +42,15 @@ const kernels = {
42
42
  precise: {
43
43
  js: "((x) => ((-Math.min(1e4, Math.max(-1e4, (1) / (((1 + Math.exp(Math.max(-50, Math.min(50, x))))) < 1e-4 && ((1 + Math.exp(Math.max(-50, Math.min(50, x))))) > -1e-4 ? (((1 + Math.exp(Math.max(-50, Math.min(50, x))))) >= 0 ? 1e-4 : -1e-4) : ((1 + Math.exp(Math.max(-50, Math.min(50, x))))))))) + 1))",
44
44
  eval: ((x) => ((-Math.min(1e4, Math.max(-1e4, (1) / (((1 + Math.exp(Math.max(-50, Math.min(50, x))))) < 1e-4 && ((1 + Math.exp(Math.max(-50, Math.min(50, x))))) > -1e-4 ? (((1 + Math.exp(Math.max(-50, Math.min(50, x))))) >= 0 ? 1e-4 : -1e-4) : ((1 + Math.exp(Math.max(-50, Math.min(50, x))))))))) + 1)),
45
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-fminf(fmaxf((1f / copysignf(fmaxf(fabsf((1f + expf(fmaxf(-50.0f, fminf(50.0f, x))))), 1.0e-4f), (1f + expf(fmaxf(-50.0f, fminf(50.0f, x)))))), -1.0e4f), 1.0e4f)) + 1f);\n}",
46
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-(1 / (abs((1 + torch.exp(torch.clamp(x, -50.0, 50.0)))) < 1e-4 ? 1e-4 : (1 + torch.exp(torch.clamp(x, -50.0, 50.0)))))) + 1)",
45
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-fminf(fmaxf((1f / copysignf(fmaxf(fabsf((1f + expf(fmaxf(-50.0f, fminf(50.0f, x))))), 1.0e-4f), (1f + expf(fmaxf(-50.0f, fminf(50.0f, x)))))), -1.0e4f), 1.0e4f)) + 1f);\n}",
46
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-(1 / (abs((1 + torch.exp(torch.clamp(x, -50.0, 50.0)))) < 1e-4 ? 1e-4 : (1 + torch.exp(torch.clamp(x, -50.0, 50.0)))))) + 1)",
47
47
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNleHAAAQMCAQAHCQEFc3BlYXIAAQp9AXsARAAAAAAAAPA/RAAAAAAAAPA/IABEAAAAAAAAScClRAAAAAAAAElApBAAoJlELUMc6+I2Gj+lRAAAAAAAAPA/IABEAAAAAAAAScClRAAAAAAAAElApBAAoKajRAAAAAAAiMPApUQAAAAAAIjDQKSaRAAAAAAAAPA/oAs=",
48
48
  },
49
49
  fast: {
50
50
  js: "((x) => Math.min(1e4, Math.max(-1e4, (x) / (((1 + Math.abs(x))) < 1e-4 && ((1 + Math.abs(x))) > -1e-4 ? (((1 + Math.abs(x))) >= 0 ? 1e-4 : -1e-4) : ((1 + Math.abs(x)))))))",
51
51
  eval: ((x) => Math.min(1e4, Math.max(-1e4, (x) / (((1 + Math.abs(x))) < 1e-4 && ((1 + Math.abs(x))) > -1e-4 ? (((1 + Math.abs(x))) >= 0 ? 1e-4 : -1e-4) : ((1 + Math.abs(x))))))),
52
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((x / copysignf(fmaxf(fabsf((1f + fabsf(x))), 1.0e-4f), (1f + fabsf(x)))), -1.0e4f), 1.0e4f);\n}",
53
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (x / (abs((1 + torch.abs(x))) < 1e-4 ? 1e-4 : (1 + torch.abs(x))))",
52
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((x / copysignf(fmaxf(fabsf((1f + fabsf(x))), 1.0e-4f), (1f + fabsf(x)))), -1.0e4f), 1.0e4f);\n}",
53
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (x / (abs((1 + torch.abs(x))) < 1e-4 ? 1e-4 : (1 + torch.abs(x))))",
54
54
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACkEBPwAgAEQAAAAAAADwPyAAmaCZRC1DHOviNho/pUQAAAAAAADwPyAAmaCmo0QAAAAAAIjDwKVEAAAAAACIw0CkCw==",
55
55
  },
56
56
  meta: {
@@ -67,15 +67,15 @@ const kernels = {
67
67
  precise: {
68
68
  js: "((S, A, R) => ((4.5 * S) + (A + R)))",
69
69
  eval: ((S, A, R) => ((4.5 * S) + (A + R))),
70
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((4.5f * S) + (A + R));\n}",
71
- py: "import torch\n\ndef spear_fn(S, A, R):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((4.5 * S) + (A + R))",
70
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((4.5f * S) + (A + R));\n}",
71
+ py: "import torch\n\ndef spear_fn(S, A, R):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((4.5 * S) + (A + R))",
72
72
  wasmBase64: "AGFzbQEAAAABDQJgA3x8fAF8YAF8AXwDAgEABwkBBXNwZWFyAAAKFgEUAEQAAAAAAAASQCAAoiABIAKgoAs=",
73
73
  },
74
74
  fast: {
75
75
  js: "((A) => A)",
76
76
  eval: ((A) => A),
77
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return A;\n}",
78
- py: "import torch\n\ndef spear_fn(A):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return A",
77
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return A;\n}",
78
+ py: "import torch\n\ndef spear_fn(A):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return A",
79
79
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACgYBBAAgAAs=",
80
80
  },
81
81
  meta: {
@@ -92,15 +92,15 @@ const kernels = {
92
92
  precise: {
93
93
  js: "((t) => ((4.905917 * (t) * (t)) + -0.001081))",
94
94
  eval: ((t) => ((4.905917 * (t) * (t)) + -0.001081)),
95
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((4.905917f * powf(t, 2.0f)) + -0.001081f);\n}",
96
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((4.905917 * (t * t)) + -0.001081)",
95
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((4.905917f * powf(t, 2.0f)) + -0.001081f);\n}",
96
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((4.905917 * (t * t)) + -0.001081)",
97
97
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACh0BGwBEzY+/tKifE0AgACAAoqJEBg5o6Qq2Ub+gCw==",
98
98
  },
99
99
  fast: {
100
100
  js: "((t) => (t) * (t))",
101
101
  eval: ((t) => (t) * (t)),
102
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf(t, 2.0f);\n}",
103
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (t * t)",
102
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf(t, 2.0f);\n}",
103
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (t * t)",
104
104
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACgkBBwAgACAAogs=",
105
105
  },
106
106
  meta: {
@@ -117,15 +117,15 @@ const kernels = {
117
117
  precise: {
118
118
  js: "((a) => ((1.000934 * (a * Math.sqrt(Math.abs(a)))) + -0.023116))",
119
119
  eval: ((a) => ((1.000934 * (a * Math.sqrt(Math.abs(a)))) + -0.023116)),
120
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.000934f * (a * sqrtf(fabsf(a)))) + -0.023116f);\n}",
121
- py: "import torch\n\ndef spear_fn(a):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((1.000934 * (a * torch.sqrt(torch.abs(a)))) + -0.023116)",
120
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.000934f * (a * sqrtf(fabsf(a)))) + -0.023116f);\n}",
121
+ py: "import torch\n\ndef spear_fn(a):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((1.000934 * (a * torch.sqrt(torch.abs(a)))) + -0.023116)",
122
122
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACh8BHQBEfEW3XtMD8D8gACAAmZ+iokQZrg6AuKuXv6AL",
123
123
  },
124
124
  fast: {
125
125
  js: "((a) => Math.sqrt(Math.abs((a) * (a) * (a))))",
126
126
  eval: ((a) => Math.sqrt(Math.abs((a) * (a) * (a)))),
127
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return sqrtf(fabsf(powf(a, 3.0f)));\n}",
128
- py: "import torch\n\ndef spear_fn(a):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.sqrt(torch.abs((a ** 3)))",
127
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return sqrtf(fabsf(powf(a, 3.0f)));\n}",
128
+ py: "import torch\n\ndef spear_fn(a):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.sqrt(torch.abs((a ** 3)))",
129
129
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACg4BDAAgACAAIACiopmfCw==",
130
130
  },
131
131
  meta: {
@@ -142,15 +142,15 @@ const kernels = {
142
142
  precise: {
143
143
  js: "((x) => ((0.446257 * Math.atan(Math.min((0.946094 * Math.max(x, -2.183)), 2.045418))) + 0.50123))",
144
144
  eval: ((x) => ((0.446257 * Math.atan(Math.min((0.946094 * Math.max(x, -2.183)), 2.045418))) + 0.50123)),
145
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.446257f * atanf(fminf((0.946094f * fmaxf(x, -2.183f)), 2.045418f))) + 0.50123f);\n}",
146
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.446257 * torch.atan(torch.minimum((0.946094 * torch.maximum(x, -2.183)), 2.045418))) + 0.50123)",
145
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.446257f * atanf(fminf((0.946094f * fmaxf(x, -2.183f)), 2.045418f))) + 0.50123f);\n}",
146
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.446257 * torch.atan(torch.minimum((0.946094 * torch.maximum(x, -2.183)), 2.045418))) + 0.50123)",
147
147
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgwBA2VudgRhdGFuAAEDAgEABwkBBXNwZWFyAAEKOgE4AETOGyeFeY/cP0RsI57sZkbuPyAARBBYObTIdgHApaJEpTLFHARdAECkEACiREPFOH8TCuA/oAs=",
148
148
  },
149
149
  fast: {
150
150
  js: "((x) => ((0.543518 * Math.min(1e4, Math.max(-1e4, (x) / ((Math.max(1.559472, (0.337459 + Math.abs(x)))) < 1e-4 && (Math.max(1.559472, (0.337459 + Math.abs(x)))) > -1e-4 ? ((Math.max(1.559472, (0.337459 + Math.abs(x)))) >= 0 ? 1e-4 : -1e-4) : (Math.max(1.559472, (0.337459 + Math.abs(x)))))))) + 0.5))",
151
151
  eval: ((x) => ((0.543518 * Math.min(1e4, Math.max(-1e4, (x) / ((Math.max(1.559472, (0.337459 + Math.abs(x)))) < 1e-4 && (Math.max(1.559472, (0.337459 + Math.abs(x)))) > -1e-4 ? ((Math.max(1.559472, (0.337459 + Math.abs(x)))) >= 0 ? 1e-4 : -1e-4) : (Math.max(1.559472, (0.337459 + Math.abs(x)))))))) + 0.5)),
152
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.543518f * fminf(fmaxf((x / copysignf(fmaxf(fabsf(fmaxf(1.559472f, (0.337459f + fabsf(x)))), 1.0e-4f), fmaxf(1.559472f, (0.337459f + fabsf(x))))), -1.0e4f), 1.0e4f)) + 0.5f);\n}",
153
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.543518 * (x / (abs(torch.maximum(1.559472, (0.337459 + torch.abs(x)))) < 1e-4 ? 1e-4 : torch.maximum(1.559472, (0.337459 + torch.abs(x)))))) + 0.5)",
152
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.543518f * fminf(fmaxf((x / copysignf(fmaxf(fabsf(fmaxf(1.559472f, (0.337459f + fabsf(x)))), 1.0e-4f), fmaxf(1.559472f, (0.337459f + fabsf(x))))), -1.0e4f), 1.0e4f)) + 0.5f);\n}",
153
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.543518 * (x / (abs(torch.maximum(1.559472, (0.337459 + torch.abs(x)))) < 1e-4 ? 1e-4 : torch.maximum(1.559472, (0.337459 + torch.abs(x)))))) + 0.5)",
154
154
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACmkBZwBEyjFZ3H9k4T8gAESCcXDpmPP4P0RRai+i7ZjVPyAAmaClmUQtQxzr4jYaP6VEgnFw6Zjz+D9EUWovou2Y1T8gAJmgpaajRAAAAAAAiMPApUQAAAAAAIjDQKSiRAAAAAAAAOA/oAs=",
155
155
  },
156
156
  meta: {
@@ -167,15 +167,15 @@ const kernels = {
167
167
  precise: {
168
168
  js: "((t) => ((-1.3106328406309695 * ((Math.max(Math.cos(t), 0.682826) * -0.71535) - Math.cos((2.787312 * t)))) + -0.7075131452525627))",
169
169
  eval: ((t) => ((-1.3106328406309695 * ((Math.max(Math.cos(t), 0.682826) * -0.71535) - Math.cos((2.787312 * t)))) + -0.7075131452525627)),
170
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-1.310633f * ((fmaxf(cosf(t), 0.682826f) * -0.71535f) - cosf((2.787312f * t)))) + -0.707513f);\n}",
171
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-1.310633 * ((torch.maximum(torch.cos(t), 0.682826) * -0.71535) - torch.cos((2.787312 * t)))) + -0.707513)",
170
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-1.310633f * ((fmaxf(cosf(t), 0.682826f) * -0.71535f) - cosf((2.787312f * t)))) + -0.707513f);\n}",
171
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-1.310633 * ((torch.maximum(torch.cos(t), 0.682826) * -0.71535) - torch.cos((2.787312 * t)))) + -0.707513)",
172
172
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNjb3MAAQMCAQAHCQEFc3BlYXIAAQo/AT0ARHEtOSRa+PS/IAAQAETNeFvptdnlP6VE+THmriXk5r+iRKD83TtqTAZAIACiEAChokQCMoub8qPmv6AL",
173
173
  },
174
174
  fast: {
175
175
  js: "((t) => Math.cos((2.733044 * t)))",
176
176
  eval: ((t) => Math.cos((2.733044 * t))),
177
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return cosf((2.733044f * t));\n}",
178
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.cos((2.733044 * t))",
177
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return cosf((2.733044f * t));\n}",
178
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.cos((2.733044 * t))",
179
179
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNjb3MAAQMCAQAHCQEFc3BlYXIAAQoSARAARHE7NCxG3QVAIACiEAAL",
180
180
  },
181
181
  meta: {
@@ -192,15 +192,15 @@ const kernels = {
192
192
  precise: {
193
193
  js: "((x) => (1.143472 * Math.min(1e4, Math.max(-1e4, ((x + (0.135 * (x) * (x) * (x)))) / (((0.584 + (0.75 * (x) * (x)))) < 1e-4 && ((0.584 + (0.75 * (x) * (x)))) > -1e-4 ? (((0.584 + (0.75 * (x) * (x)))) >= 0 ? 1e-4 : -1e-4) : ((0.584 + (0.75 * (x) * (x)))))))))",
194
194
  eval: ((x) => (1.143472 * Math.min(1e4, Math.max(-1e4, ((x + (0.135 * (x) * (x) * (x)))) / (((0.584 + (0.75 * (x) * (x)))) < 1e-4 && ((0.584 + (0.75 * (x) * (x)))) > -1e-4 ? (((0.584 + (0.75 * (x) * (x)))) >= 0 ? 1e-4 : -1e-4) : ((0.584 + (0.75 * (x) * (x))))))))),
195
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (1.143472f * fminf(fmaxf(((x + (0.135f * powf(x, 3.0f))) / copysignf(fmaxf(fabsf((0.584f + (0.75f * powf(x, 2.0f)))), 1.0e-4f), (0.584f + (0.75f * powf(x, 2.0f))))), -1.0e4f), 1.0e4f));\n}",
196
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (1.143472 * ((x + (0.135 * (x ** 3))) / (abs((0.584 + (0.75 * (x * x)))) < 1e-4 ? 1e-4 : (0.584 + (0.75 * (x * x))))))",
195
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (1.143472f * fminf(fmaxf(((x + (0.135f * powf(x, 3.0f))) / copysignf(fmaxf(fabsf((0.584f + (0.75f * powf(x, 2.0f)))), 1.0e-4f), (0.584f + (0.75f * powf(x, 2.0f))))), -1.0e4f), 1.0e4f));\n}",
196
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (1.143472 * ((x + (0.135 * (x ** 3))) / (abs((0.584 + (0.75 * (x * x)))) < 1e-4 ? 1e-4 : (0.584 + (0.75 * (x * x))))))",
197
197
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACnYBdABEdES+S6lL8j8gAERI4XoUrkfBPyAAIAAgAKKioqBE46WbxCCw4j9EAAAAAAAA6D8gACAAoqKgmUQtQxzr4jYaP6VE46WbxCCw4j9EAAAAAAAA6D8gACAAoqKgpqNEAAAAAACIw8ClRAAAAAAAiMNApKIL",
198
198
  },
199
199
  fast: {
200
200
  js: "((x) => Math.min(1e4, Math.max(-1e4, ((x + (0.169 * (x) * (x) * (x)))) / (((0.5 + (0.75 * (x) * (x)))) < 1e-4 && ((0.5 + (0.75 * (x) * (x)))) > -1e-4 ? (((0.5 + (0.75 * (x) * (x)))) >= 0 ? 1e-4 : -1e-4) : ((0.5 + (0.75 * (x) * (x))))))))",
201
201
  eval: ((x) => Math.min(1e4, Math.max(-1e4, ((x + (0.169 * (x) * (x) * (x)))) / (((0.5 + (0.75 * (x) * (x)))) < 1e-4 && ((0.5 + (0.75 * (x) * (x)))) > -1e-4 ? (((0.5 + (0.75 * (x) * (x)))) >= 0 ? 1e-4 : -1e-4) : ((0.5 + (0.75 * (x) * (x)))))))),
202
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf(((x + (0.169f * powf(x, 3.0f))) / copysignf(fmaxf(fabsf((0.5f + (0.75f * powf(x, 2.0f)))), 1.0e-4f), (0.5f + (0.75f * powf(x, 2.0f))))), -1.0e4f), 1.0e4f);\n}",
203
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((x + (0.169 * (x ** 3))) / (abs((0.5 + (0.75 * (x * x)))) < 1e-4 ? 1e-4 : (0.5 + (0.75 * (x * x)))))",
202
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf(((x + (0.169f * powf(x, 3.0f))) / copysignf(fmaxf(fabsf((0.5f + (0.75f * powf(x, 2.0f)))), 1.0e-4f), (0.5f + (0.75f * powf(x, 2.0f))))), -1.0e4f), 1.0e4f);\n}",
203
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((x + (0.169 * (x ** 3))) / (abs((0.5 + (0.75 * (x * x)))) < 1e-4 ? 1e-4 : (0.5 + (0.75 * (x * x)))))",
204
204
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACmwBagAgAERvEoPAyqHFPyAAIAAgAKKioqBEAAAAAAAA4D9EAAAAAAAA6D8gACAAoqKgmUQtQxzr4jYaP6VEAAAAAAAA4D9EAAAAAAAA6D8gACAAoqKgpqNEAAAAAACIw8ClRAAAAAAAiMNApAs=",
205
205
  },
206
206
  meta: {
@@ -217,15 +217,15 @@ const kernels = {
217
217
  precise: {
218
218
  js: "((x) => (x * Math.max(0, Math.exp(Math.max(-50, Math.min(50, x))))))",
219
219
  eval: ((x) => (x * Math.max(0, Math.exp(Math.max(-50, Math.min(50, x)))))),
220
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (x * fmaxf(0.0f, expf(fmaxf(-50.0f, fminf(50.0f, x)))));\n}",
221
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (x * torch.relu(torch.exp(torch.clamp(x, -50.0, 50.0))))",
220
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (x * fmaxf(0.0f, expf(fmaxf(-50.0f, fminf(50.0f, x)))));\n}",
221
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (x * torch.relu(torch.exp(torch.clamp(x, -50.0, 50.0))))",
222
222
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNleHAAAQMCAQAHCQEFc3BlYXIAAQopAScAIAAgAEQAAAAAAABJwKVEAAAAAAAASUCkEABEAAAAAAAAAAClogs=",
223
223
  },
224
224
  fast: {
225
225
  js: "((x) => (x) * (x))",
226
226
  eval: ((x) => (x) * (x)),
227
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf(x, 2.0f);\n}",
228
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (x * x)",
227
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf(x, 2.0f);\n}",
228
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (x * x)",
229
229
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACgkBBwAgACAAogs=",
230
230
  },
231
231
  meta: {
@@ -242,15 +242,15 @@ const kernels = {
242
242
  precise: {
243
243
  js: "((t) => ((-1.4198725250153843 * (2.239754 - Math.log(Math.max(1e-30, Math.atan(Math.exp(Math.max(-50, Math.min(50, t)))))))) + 3.5326988727281186))",
244
244
  eval: ((t) => ((-1.4198725250153843 * (2.239754 - Math.log(Math.max(1e-30, Math.atan(Math.exp(Math.max(-50, Math.min(50, t)))))))) + 3.5326988727281186)),
245
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-1.419873f * (2.239754f - logf(fmaxf(1.0e-30f, atanf(expf(fmaxf(-50.0f, fminf(50.0f, t)))))))) + 3.532699f);\n}",
246
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-1.419873 * (2.239754 - torch.log(torch.clamp(torch.atan(torch.exp(torch.clamp(t, -50.0, 50.0))), min=1e-30)))) + 3.532699)",
245
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-1.419873f * (2.239754f - logf(fmaxf(1.0e-30f, atanf(expf(fmaxf(-50.0f, fminf(50.0f, t)))))))) + 3.532699f);\n}",
246
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-1.419873 * (2.239754 - torch.log(torch.clamp(torch.atan(torch.exp(torch.clamp(t, -50.0, 50.0))), min=1e-30)))) + 3.532699)",
247
247
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AiADA2VudgNleHAAAQNlbnYEYXRhbgABA2VudgNsb2cAAQMCAQAHCQEFc3BlYXIAAwpIAUYARFrhtkDMt/a/RHWuKCUE6wFAIABEAAAAAAAAScClRAAAAAAAAElApBAAEAFEoMLr/ktItDmlEAKhokTf3Weg90IMQKAL",
248
248
  },
249
249
  fast: {
250
250
  js: "((t) => ((-0.998327 * Math.min(Math.exp(Math.max(-50, Math.min(50, (-t)))), 2)) + 0.996889))",
251
251
  eval: ((t) => ((-0.998327 * Math.min(Math.exp(Math.max(-50, Math.min(50, (-t)))), 2)) + 0.996889)),
252
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.998327f * fminf(expf(fmaxf(-50.0f, fminf(50.0f, (-t)))), 2f)) + 0.996889f);\n}",
253
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-0.998327 * torch.minimum(torch.exp(torch.clamp((-t), -50.0, 50.0)), 2)) + 0.996889)",
252
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.998327f * fminf(expf(fmaxf(-50.0f, fminf(50.0f, (-t)))), 2f)) + 0.996889f);\n}",
253
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-0.998327 * torch.minimum(torch.exp(torch.clamp((-t), -50.0, 50.0)), 2)) + 0.996889)",
254
254
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNleHAAAQMCAQAHCQEFc3BlYXIAAQo7ATkARGLX9nZL8u+/IACaRAAAAAAAAEnApUQAAAAAAABJQKQQAEQAAAAAAAAAQKSiRKW/l8KD5u8/oAs=",
255
255
  },
256
256
  meta: {
@@ -267,15 +267,15 @@ const kernels = {
267
267
  precise: {
268
268
  js: "((x) => Math.sqrt(Math.abs(Math.exp(Math.max(-50, Math.min(50, (-(x) * (x))))))))",
269
269
  eval: ((x) => Math.sqrt(Math.abs(Math.exp(Math.max(-50, Math.min(50, (-(x) * (x)))))))),
270
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return sqrtf(fabsf(expf(fmaxf(-50.0f, fminf(50.0f, (-powf(x, 2.0f)))))));\n}",
271
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.sqrt(torch.abs(torch.exp(torch.clamp((-(x * x)), -50.0, 50.0))))",
270
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return sqrtf(fabsf(expf(fmaxf(-50.0f, fminf(50.0f, (-powf(x, 2.0f)))))));\n}",
271
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.sqrt(torch.abs(torch.exp(torch.clamp((-(x * x)), -50.0, 50.0))))",
272
272
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNleHAAAQMCAQAHCQEFc3BlYXIAAQoiASAAIAAgAKKaRAAAAAAAAEnApUQAAAAAAABJQKQQAJmfCw==",
273
273
  },
274
274
  fast: {
275
275
  js: "((x) => Math.abs(x))",
276
276
  eval: ((x) => Math.abs(x)),
277
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fabsf(x);\n}",
278
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.abs(x)",
277
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fabsf(x);\n}",
278
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.abs(x)",
279
279
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACgcBBQAgAJkL",
280
280
  },
281
281
  meta: {
@@ -292,15 +292,15 @@ const kernels = {
292
292
  precise: {
293
293
  js: "((t) => ((-0.496181 * Math.cos((t * 3.16221))) + 0.500616))",
294
294
  eval: ((t) => ((-0.496181 * Math.cos((t * 3.16221))) + 0.500616)),
295
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.496181f * cosf((t * 3.16221f))) + 0.500616f);\n}",
296
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-0.496181 * torch.cos((t * 3.16221))) + 0.500616)",
295
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.496181f * cosf((t * 3.16221f))) + 0.500616f);\n}",
296
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-0.496181 * torch.cos((t * 3.16221))) + 0.500616)",
297
297
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNjb3MAAQMCAQAHCQEFc3BlYXIAAQomASQARIBh+fNtwd+/IABEXKyowTRMCUCiEACiRLhWe9gLBeA/oAs=",
298
298
  },
299
299
  fast: {
300
300
  js: "((t) => Math.cos((3.205096 * t)))",
301
301
  eval: ((t) => Math.cos((3.205096 * t))),
302
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return cosf((3.205096f * t));\n}",
303
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.cos((3.205096 * t))",
302
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return cosf((3.205096f * t));\n}",
303
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.cos((3.205096 * t))",
304
304
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNjb3MAAQMCAQAHCQEFc3BlYXIAAQoSARAARMZSJF8JpAlAIACiEAAL",
305
305
  },
306
306
  meta: {
@@ -317,15 +317,15 @@ const kernels = {
317
317
  precise: {
318
318
  js: "((u) => ((-u) + 1))",
319
319
  eval: ((u) => ((-u) + 1)),
320
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-u) + 1f);\n}",
321
- py: "import torch\n\ndef spear_fn(u):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-u) + 1)",
320
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-u) + 1f);\n}",
321
+ py: "import torch\n\ndef spear_fn(u):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-u) + 1)",
322
322
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAAChEBDwAgAJpEAAAAAAAA8D+gCw==",
323
323
  },
324
324
  fast: {
325
325
  js: "((u) => (-168.810432 * u))",
326
326
  eval: ((u) => (-168.810432 * u)),
327
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (-168.810432f * u);\n}",
328
- py: "import torch\n\ndef spear_fn(u):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (-168.810432 * u)",
327
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (-168.810432f * u);\n}",
328
+ py: "import torch\n\ndef spear_fn(u):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (-168.810432 * u)",
329
329
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAAChABDgBEOPQWD+8ZZcAgAKIL",
330
330
  },
331
331
  meta: {
@@ -342,15 +342,15 @@ const kernels = {
342
342
  precise: {
343
343
  js: "((sigma) => ((19.224472260676723 * ((1 + sigma)) * ((1 + sigma))) + -19.1144678187698))",
344
344
  eval: ((sigma) => ((19.224472260676723 * ((1 + sigma)) * ((1 + sigma))) + -19.1144678187698)),
345
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((19.224472f * powf((1f + sigma), 2.0f)) + -19.114468f);\n}",
346
- py: "import torch\n\ndef spear_fn(sigma):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((19.224472 * ((1 + sigma) * (1 + sigma))) + -19.114468)",
345
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((19.224472f * powf((1f + sigma), 2.0f)) + -19.114468f);\n}",
346
+ py: "import torch\n\ndef spear_fn(sigma):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((19.224472 * ((1 + sigma) * (1 + sigma))) + -19.114468)",
347
347
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACjEBLwBEOXeaA3c5M0BEAAAAAAAA8D8gAKBEAAAAAAAA8D8gAKCiokSND1LDTR0zwKAL",
348
348
  },
349
349
  fast: {
350
350
  js: "((sigma) => sigma)",
351
351
  eval: ((sigma) => sigma),
352
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return sigma;\n}",
353
- py: "import torch\n\ndef spear_fn(sigma):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return sigma",
352
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return sigma;\n}",
353
+ py: "import torch\n\ndef spear_fn(sigma):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return sigma",
354
354
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACgYBBAAgAAs=",
355
355
  },
356
356
  meta: {
@@ -367,8 +367,8 @@ const kernels = {
367
367
  precise: {
368
368
  js: "((b, a) => (b - a))",
369
369
  eval: ((b, a) => (b - a)),
370
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (b - a);\n}",
371
- py: "import torch\n\ndef spear_fn(b, a):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (b - a)",
370
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (b - a);\n}",
371
+ py: "import torch\n\ndef spear_fn(b, a):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (b - a)",
372
372
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAMCAQAHCQEFc3BlYXIAAAoJAQcAIAAgAaEL",
373
373
  },
374
374
  meta: {
@@ -385,15 +385,15 @@ const kernels = {
385
385
  precise: {
386
386
  js: "((b) => Math.min(1e4, Math.max(-1e4, (1) / ((Math.sqrt(Math.abs((1 + (-(b) * (b)))))) < 1e-4 && (Math.sqrt(Math.abs((1 + (-(b) * (b)))))) > -1e-4 ? ((Math.sqrt(Math.abs((1 + (-(b) * (b)))))) >= 0 ? 1e-4 : -1e-4) : (Math.sqrt(Math.abs((1 + (-(b) * (b))))))))))",
387
387
  eval: ((b) => Math.min(1e4, Math.max(-1e4, (1) / ((Math.sqrt(Math.abs((1 + (-(b) * (b)))))) < 1e-4 && (Math.sqrt(Math.abs((1 + (-(b) * (b)))))) > -1e-4 ? ((Math.sqrt(Math.abs((1 + (-(b) * (b)))))) >= 0 ? 1e-4 : -1e-4) : (Math.sqrt(Math.abs((1 + (-(b) * (b)))))))))),
388
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((1f / copysignf(fmaxf(fabsf(sqrtf(fabsf((1f + (-powf(b, 2.0f)))))), 1.0e-4f), sqrtf(fabsf((1f + (-powf(b, 2.0f))))))), -1.0e4f), 1.0e4f);\n}",
389
- py: "import torch\n\ndef spear_fn(b):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (1 / (abs(torch.sqrt(torch.abs((1 + (-(b * b)))))) < 1e-4 ? 1e-4 : torch.sqrt(torch.abs((1 + (-(b * b)))))))",
388
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((1f / copysignf(fmaxf(fabsf(sqrtf(fabsf((1f + (-powf(b, 2.0f)))))), 1.0e-4f), sqrtf(fabsf((1f + (-powf(b, 2.0f))))))), -1.0e4f), 1.0e4f);\n}",
389
+ py: "import torch\n\ndef spear_fn(b):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (1 / (abs(torch.sqrt(torch.abs((1 + (-(b * b)))))) < 1e-4 ? 1e-4 : torch.sqrt(torch.abs((1 + (-(b * b)))))))",
390
390
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAAClIBUABEAAAAAAAA8D9EAAAAAAAA8D8gACAAopqgmZ+ZRC1DHOviNho/pUQAAAAAAADwPyAAIACimqCZn6ajRAAAAAAAiMPApUQAAAAAAIjDQKQL",
391
391
  },
392
392
  fast: {
393
393
  js: "((b) => Math.min(1e4, Math.max(-1e4, (1) / ((Math.sqrt(Math.abs((1 + (-b))))) < 1e-4 && (Math.sqrt(Math.abs((1 + (-b))))) > -1e-4 ? ((Math.sqrt(Math.abs((1 + (-b))))) >= 0 ? 1e-4 : -1e-4) : (Math.sqrt(Math.abs((1 + (-b)))))))))",
394
394
  eval: ((b) => Math.min(1e4, Math.max(-1e4, (1) / ((Math.sqrt(Math.abs((1 + (-b))))) < 1e-4 && (Math.sqrt(Math.abs((1 + (-b))))) > -1e-4 ? ((Math.sqrt(Math.abs((1 + (-b))))) >= 0 ? 1e-4 : -1e-4) : (Math.sqrt(Math.abs((1 + (-b))))))))),
395
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((1f / copysignf(fmaxf(fabsf(sqrtf(fabsf((1f + (-b))))), 1.0e-4f), sqrtf(fabsf((1f + (-b)))))), -1.0e4f), 1.0e4f);\n}",
396
- py: "import torch\n\ndef spear_fn(b):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (1 / (abs(torch.sqrt(torch.abs((1 + (-b))))) < 1e-4 ? 1e-4 : torch.sqrt(torch.abs((1 + (-b))))))",
395
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((1f / copysignf(fmaxf(fabsf(sqrtf(fabsf((1f + (-b))))), 1.0e-4f), sqrtf(fabsf((1f + (-b)))))), -1.0e4f), 1.0e4f);\n}",
396
+ py: "import torch\n\ndef spear_fn(b):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (1 / (abs(torch.sqrt(torch.abs((1 + (-b))))) < 1e-4 ? 1e-4 : torch.sqrt(torch.abs((1 + (-b))))))",
397
397
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACkwBSgBEAAAAAAAA8D9EAAAAAAAA8D8gAJqgmZ+ZRC1DHOviNho/pUQAAAAAAADwPyAAmqCZn6ajRAAAAAAAiMPApUQAAAAAAIjDQKQL",
398
398
  },
399
399
  meta: {
@@ -410,8 +410,8 @@ const kernels = {
410
410
  precise: {
411
411
  js: "((c) => Math.min(1e4, Math.max(-1e4, ((c) * (c) * (c)) / (((1 + (c) * (c) * (c))) < 1e-4 && ((1 + (c) * (c) * (c))) > -1e-4 ? (((1 + (c) * (c) * (c))) >= 0 ? 1e-4 : -1e-4) : ((1 + (c) * (c) * (c)))))))",
412
412
  eval: ((c) => Math.min(1e4, Math.max(-1e4, ((c) * (c) * (c)) / (((1 + (c) * (c) * (c))) < 1e-4 && ((1 + (c) * (c) * (c))) > -1e-4 ? (((1 + (c) * (c) * (c))) >= 0 ? 1e-4 : -1e-4) : ((1 + (c) * (c) * (c))))))),
413
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((powf(c, 3.0f) / copysignf(fmaxf(fabsf((1f + powf(c, 3.0f))), 1.0e-4f), (1f + powf(c, 3.0f)))), -1.0e4f), 1.0e4f);\n}",
414
- py: "import torch\n\ndef spear_fn(c):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((c ** 3) / (abs((1 + (c ** 3))) < 1e-4 ? 1e-4 : (1 + (c ** 3))))",
413
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((powf(c, 3.0f) / copysignf(fmaxf(fabsf((1f + powf(c, 3.0f))), 1.0e-4f), (1f + powf(c, 3.0f)))), -1.0e4f), 1.0e4f);\n}",
414
+ py: "import torch\n\ndef spear_fn(c):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((c ** 3) / (abs((1 + (c ** 3))) < 1e-4 ? 1e-4 : (1 + (c ** 3))))",
415
415
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAAClEBTwAgACAAIACiokQAAAAAAADwPyAAIAAgAKKioJlELUMc6+I2Gj+lRAAAAAAAAPA/IAAgACAAoqKgpqNEAAAAAACIw8ClRAAAAAAAiMNApAs=",
416
416
  },
417
417
  meta: {
@@ -428,15 +428,15 @@ const kernels = {
428
428
  precise: {
429
429
  js: "((b) => ((4.044113 * Math.min(1e4, Math.max(-1e4, (((2.83748 + Math.min(1e4, Math.max(-1e4, (10.692104) / ((b) < 1e-4 && (b) > -1e-4 ? ((b) >= 0 ? 1e-4 : -1e-4) : (b))))) + b)) / (((b) * (b)) < 1e-4 && ((b) * (b)) > -1e-4 ? (((b) * (b)) >= 0 ? 1e-4 : -1e-4) : ((b) * (b)))))) + -0.001252))",
430
430
  eval: ((b) => ((4.044113 * Math.min(1e4, Math.max(-1e4, (((2.83748 + Math.min(1e4, Math.max(-1e4, (10.692104) / ((b) < 1e-4 && (b) > -1e-4 ? ((b) >= 0 ? 1e-4 : -1e-4) : (b))))) + b)) / (((b) * (b)) < 1e-4 && ((b) * (b)) > -1e-4 ? (((b) * (b)) >= 0 ? 1e-4 : -1e-4) : ((b) * (b)))))) + -0.001252)),
431
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((4.044113f * fminf(fmaxf((((2.83748f + fminf(fmaxf((10.692104f / copysignf(fmaxf(fabsf(b), 1.0e-4f), b)), -1.0e4f), 1.0e4f)) + b) / copysignf(fmaxf(fabsf(powf(b, 2.0f)), 1.0e-4f), powf(b, 2.0f))), -1.0e4f), 1.0e4f)) + -0.001252f);\n}",
432
- py: "import torch\n\ndef spear_fn(b):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((4.044113 * (((2.83748 + (10.692104 / (abs(b) < 1e-4 ? 1e-4 : b))) + b) / (abs((b * b)) < 1e-4 ? 1e-4 : (b * b)))) + -0.001252)",
431
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((4.044113f * fminf(fmaxf((((2.83748f + fminf(fmaxf((10.692104f / copysignf(fmaxf(fabsf(b), 1.0e-4f), b)), -1.0e4f), 1.0e4f)) + b) / copysignf(fmaxf(fabsf(powf(b, 2.0f)), 1.0e-4f), powf(b, 2.0f))), -1.0e4f), 1.0e4f)) + -0.001252f);\n}",
432
+ py: "import torch\n\ndef spear_fn(b):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((4.044113 * (((2.83748 + (10.692104 / (abs(b) < 1e-4 ? 1e-4 : b))) + b) / (abs((b * b)) < 1e-4 ? 1e-4 : (b * b)))) + -0.001252)",
433
433
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACn4BfABEVVBR9SstEEBEwW7YtiizBkBEkNyadFtiJUAgAJlELUMc6+I2Gj+lIACmo0QAAAAAAIjDwKVEAAAAAACIw0CkoCAAoCAAIACimUQtQxzr4jYaP6UgACAAoqajRAAAAAAAiMPApUQAAAAAAIjDQKSiRHJvfsNEg1S/oAs=",
434
434
  },
435
435
  fast: {
436
436
  js: "((b) => (Math.min(1e4, Math.max(-1e4, (0.630738) / ((b) < 1e-4 && (b) > -1e-4 ? ((b) >= 0 ? 1e-4 : -1e-4) : (b))))) * (Math.min(1e4, Math.max(-1e4, (0.630738) / ((b) < 1e-4 && (b) > -1e-4 ? ((b) >= 0 ? 1e-4 : -1e-4) : (b))))))",
437
437
  eval: ((b) => (Math.min(1e4, Math.max(-1e4, (0.630738) / ((b) < 1e-4 && (b) > -1e-4 ? ((b) >= 0 ? 1e-4 : -1e-4) : (b))))) * (Math.min(1e4, Math.max(-1e4, (0.630738) / ((b) < 1e-4 && (b) > -1e-4 ? ((b) >= 0 ? 1e-4 : -1e-4) : (b)))))),
438
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf(fminf(fmaxf((0.630738f / copysignf(fmaxf(fabsf(b), 1.0e-4f), b)), -1.0e4f), 1.0e4f), 2.0f);\n}",
439
- py: "import torch\n\ndef spear_fn(b):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.630738 / (abs(b) < 1e-4 ? 1e-4 : b)) * (0.630738 / (abs(b) < 1e-4 ? 1e-4 : b)))",
438
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf(fminf(fmaxf((0.630738f / copysignf(fmaxf(fabsf(b), 1.0e-4f), b)), -1.0e4f), 1.0e4f), 2.0f);\n}",
439
+ py: "import torch\n\ndef spear_fn(b):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.630738 / (abs(b) < 1e-4 ? 1e-4 : b)) * (0.630738 / (abs(b) < 1e-4 ? 1e-4 : b)))",
440
440
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACmEBXwBEuAVLdQEv5D8gAJlELUMc6+I2Gj+lIACmo0QAAAAAAIjDwKVEAAAAAACIw0CkRLgFS3UBL+Q/IACZRC1DHOviNho/pSAApqNEAAAAAACIw8ClRAAAAAAAiMNApKIL",
441
441
  },
442
442
  meta: {
@@ -453,15 +453,15 @@ const kernels = {
453
453
  precise: {
454
454
  js: "((r) => ((-23.07526 * Math.min(1e4, Math.max(-1e4, (Math.min(1e4, Math.max(-1e4, (Math.log(Math.max(1e-30, r))) / ((((r) * (r) * (r)) * ((r) * (r) * (r)) * ((r) * (r) * (r))) < 1e-4 && (((r) * (r) * (r)) * ((r) * (r) * (r)) * ((r) * (r) * (r))) > -1e-4 ? ((((r) * (r) * (r)) * ((r) * (r) * (r)) * ((r) * (r) * (r))) >= 0 ? 1e-4 : -1e-4) : (((r) * (r) * (r)) * ((r) * (r) * (r)) * ((r) * (r) * (r))))))) / ((Math.cos(Math.sqrt(Math.abs((r + -1.017418))))) < 1e-4 && (Math.cos(Math.sqrt(Math.abs((r + -1.017418))))) > -1e-4 ? ((Math.cos(Math.sqrt(Math.abs((r + -1.017418))))) >= 0 ? 1e-4 : -1e-4) : (Math.cos(Math.sqrt(Math.abs((r + -1.017418))))))))) + -0.001951))",
455
455
  eval: ((r) => ((-23.07526 * Math.min(1e4, Math.max(-1e4, (Math.min(1e4, Math.max(-1e4, (Math.log(Math.max(1e-30, r))) / ((((r) * (r) * (r)) * ((r) * (r) * (r)) * ((r) * (r) * (r))) < 1e-4 && (((r) * (r) * (r)) * ((r) * (r) * (r)) * ((r) * (r) * (r))) > -1e-4 ? ((((r) * (r) * (r)) * ((r) * (r) * (r)) * ((r) * (r) * (r))) >= 0 ? 1e-4 : -1e-4) : (((r) * (r) * (r)) * ((r) * (r) * (r)) * ((r) * (r) * (r))))))) / ((Math.cos(Math.sqrt(Math.abs((r + -1.017418))))) < 1e-4 && (Math.cos(Math.sqrt(Math.abs((r + -1.017418))))) > -1e-4 ? ((Math.cos(Math.sqrt(Math.abs((r + -1.017418))))) >= 0 ? 1e-4 : -1e-4) : (Math.cos(Math.sqrt(Math.abs((r + -1.017418))))))))) + -0.001951)),
456
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-23.07526f * fminf(fmaxf((fminf(fmaxf((logf(fmaxf(1.0e-30f, r)) / copysignf(fmaxf(fabsf(powf(powf(r, 3.0f), 3.0f)), 1.0e-4f), powf(powf(r, 3.0f), 3.0f))), -1.0e4f), 1.0e4f) / copysignf(fmaxf(fabsf(cosf(sqrtf(fabsf((r + -1.017418f))))), 1.0e-4f), cosf(sqrtf(fabsf((r + -1.017418f)))))), -1.0e4f), 1.0e4f)) + -0.001951f);\n}",
457
- py: "import torch\n\ndef spear_fn(r):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-23.07526 * ((torch.log(torch.clamp(r, min=1e-30)) / (abs(((r ** 3) ** 3)) < 1e-4 ? 1e-4 : ((r ** 3) ** 3))) / (abs(torch.cos(torch.sqrt(torch.abs((r + -1.017418))))) < 1e-4 ? 1e-4 : torch.cos(torch.sqrt(torch.abs((r + -1.017418))))))) + -0.001951)",
456
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-23.07526f * fminf(fmaxf((fminf(fmaxf((logf(fmaxf(1.0e-30f, r)) / copysignf(fmaxf(fabsf(powf(powf(r, 3.0f), 3.0f)), 1.0e-4f), powf(powf(r, 3.0f), 3.0f))), -1.0e4f), 1.0e4f) / copysignf(fmaxf(fabsf(cosf(sqrtf(fabsf((r + -1.017418f))))), 1.0e-4f), cosf(sqrtf(fabsf((r + -1.017418f)))))), -1.0e4f), 1.0e4f)) + -0.001951f);\n}",
457
+ py: "import torch\n\ndef spear_fn(r):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-23.07526 * ((torch.log(torch.clamp(r, min=1e-30)) / (abs(((r ** 3) ** 3)) < 1e-4 ? 1e-4 : ((r ** 3) ** 3))) / (abs(torch.cos(torch.sqrt(torch.abs((r + -1.017418))))) < 1e-4 ? 1e-4 : torch.cos(torch.sqrt(torch.abs((r + -1.017418))))))) + -0.001951)",
458
458
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AhUCA2VudgNjb3MAAQNlbnYDbG9nAAEDAgEABwkBBXNwZWFyAAIKvQEBugEARGyyRj1EEzfAIABEoMLr/ktItDmlEAEgACAAIACioiAAIAAgAKKiIAAgACAAoqKioplELUMc6+I2Gj+lIAAgACAAoqIgACAAIACioiAAIAAgAKKioqKmo0QAAAAAAIjDwKVEAAAAAACIw0CkIABEo8nFGFhH8L+gmZ8QAJlELUMc6+I2Gj+lIABEo8nFGFhH8L+gmZ8QAKajRAAAAAAAiMPApUQAAAAAAIjDQKSiRFqfckwW91+/oAs=",
459
459
  },
460
460
  fast: {
461
461
  js: "((r) => Math.min(1e4, Math.max(-1e4, (Math.min(1, r)) / (((Math.min((r - 0.970147), 0.939027) - -69.077553)) < 1e-4 && ((Math.min((r - 0.970147), 0.939027) - -69.077553)) > -1e-4 ? (((Math.min((r - 0.970147), 0.939027) - -69.077553)) >= 0 ? 1e-4 : -1e-4) : ((Math.min((r - 0.970147), 0.939027) - -69.077553))))))",
462
462
  eval: ((r) => Math.min(1e4, Math.max(-1e4, (Math.min(1, r)) / (((Math.min((r - 0.970147), 0.939027) - -69.077553)) < 1e-4 && ((Math.min((r - 0.970147), 0.939027) - -69.077553)) > -1e-4 ? (((Math.min((r - 0.970147), 0.939027) - -69.077553)) >= 0 ? 1e-4 : -1e-4) : ((Math.min((r - 0.970147), 0.939027) - -69.077553)))))),
463
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((fminf(1f, r) / copysignf(fmaxf(fabsf((fminf((r - 0.970147f), 0.939027f) - -69.077553f)), 1.0e-4f), (fminf((r - 0.970147f), 0.939027f) - -69.077553f))), -1.0e4f), 1.0e4f);\n}",
464
- py: "import torch\n\ndef spear_fn(r):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (torch.minimum(1, r) / (abs((torch.minimum((r - 0.970147), 0.939027) - -69.077553)) < 1e-4 ? 1e-4 : (torch.minimum((r - 0.970147), 0.939027) - -69.077553)))",
463
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((fminf(1f, r) / copysignf(fmaxf(fabsf((fminf((r - 0.970147f), 0.939027f) - -69.077553f)), 1.0e-4f), (fminf((r - 0.970147f), 0.939027f) - -69.077553f))), -1.0e4f), 1.0e4f);\n}",
464
+ py: "import torch\n\ndef spear_fn(r):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (torch.minimum(1, r) / (abs((torch.minimum((r - 0.970147), 0.939027) - -69.077553)) < 1e-4 ? 1e-4 : (torch.minimum((r - 0.970147), 0.939027) - -69.077553)))",
465
465
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACnEBbwBEAAAAAAAA8D8gAKQgAEQZAKq4cQvvP6FEpfPhWYIM7j+kRDqt26D2RFHAoZlELUMc6+I2Gj+lIABEGQCquHEL7z+hRKXz4VmCDO4/pEQ6rdug9kRRwKGmo0QAAAAAAIjDwKVEAAAAAACIw0CkCw==",
466
466
  },
467
467
  meta: {
@@ -478,8 +478,8 @@ const kernels = {
478
478
  precise: {
479
479
  js: "((t) => ((0.00696 * ((t - 16.41765) * ((t - 8.280135) * Math.cos((t * 2.996281))))) + -0.000501))",
480
480
  eval: ((t) => ((0.00696 * ((t - 16.41765) * ((t - 8.280135) * Math.cos((t * 2.996281))))) + -0.000501)),
481
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.00696f * ((t - 16.41765f) * ((t - 8.280135f) * cosf((t * 2.996281f))))) + -0.000501f);\n}",
482
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.00696 * ((t - 16.41765) * ((t - 8.280135) * torch.cos((t * 2.996281))))) + -0.000501)",
481
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.00696f * ((t - 16.41765f) * ((t - 8.280135f) * cosf((t * 2.996281f))))) + -0.000501f);\n}",
482
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.00696 * ((t - 16.41765) * ((t - 8.280135) * torch.cos((t * 2.996281))))) + -0.000501)",
483
483
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNjb3MAAQMCAQAHCQEFc3BlYXIAAQpAAT4ARKciFcYWgnw/IABEpSxDHOtqMEChIABED+7O2m2PIEChIABEaQJFLGL4B0CiEACioqJE8wTCTrFqQL+gCw==",
484
484
  },
485
485
  meta: {
@@ -496,15 +496,15 @@ const kernels = {
496
496
  precise: {
497
497
  js: "((t) => ((-0.416375 * (Math.sin(Math.sin((8.28632 - t))) - (t * 0.170954))) + 0.358312))",
498
498
  eval: ((t) => ((-0.416375 * (Math.sin(Math.sin((8.28632 - t))) - (t * 0.170954))) + 0.358312)),
499
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.416375f * (sinf(sinf((8.28632f - t))) - (t * 0.170954f))) + 0.358312f);\n}",
500
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-0.416375 * (torch.sin(torch.sin((8.28632 - t))) - (t * 0.170954))) + 0.358312)",
499
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.416375f * (sinf(sinf((8.28632f - t))) - (t * 0.170954f))) + 0.358312f);\n}",
500
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-0.416375 * (torch.sin(torch.sin((8.28632 - t))) - (t * 0.170954))) + 0.358312)",
501
501
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNzaW4AAQMCAQAHCQEFc3BlYXIAAQo1ATMARNnO91Pjpdq/RKZh+IiYkiBAIAChEAAQACAARL5ojxfS4cU/oqGiRCXrcHSV7tY/oAs=",
502
502
  },
503
503
  fast: {
504
504
  js: "((t) => ((Math.min(t, 2.609741)) * (Math.min(t, 2.609741)) + (0.86783 * Math.max(1.214626, t))))",
505
505
  eval: ((t) => ((Math.min(t, 2.609741)) * (Math.min(t, 2.609741)) + (0.86783 * Math.max(1.214626, t)))),
506
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (powf(fminf(t, 2.609741f), 2.0f) + (0.86783f * fmaxf(1.214626f, t)));\n}",
507
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((torch.minimum(t, 2.609741) * torch.minimum(t, 2.609741)) + (0.86783 * torch.maximum(1.214626, t)))",
506
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (powf(fminf(t, 2.609741f), 2.0f) + (0.86783f * fmaxf(1.214626f, t)));\n}",
507
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((torch.minimum(t, 2.609741) * torch.minimum(t, 2.609741)) + (0.86783 * torch.maximum(1.214626, t)))",
508
508
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACjQBMgAgAEQhPrDjv+AEQKQgAEQhPrDjv+AEQKSiRBObj2tDxes/RNTwLawbb/M/IACloqAL",
509
509
  },
510
510
  meta: {
@@ -521,15 +521,15 @@ const kernels = {
521
521
  precise: {
522
522
  js: "((x) => ((1.002747 * Math.log(Math.max(1e-30, (1.010159 + Math.exp(Math.max(-50, Math.min(50, x))))))) + -0.008384))",
523
523
  eval: ((x) => ((1.002747 * Math.log(Math.max(1e-30, (1.010159 + Math.exp(Math.max(-50, Math.min(50, x))))))) + -0.008384)),
524
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.002747f * logf(fmaxf(1.0e-30f, (1.010159f + expf(fmaxf(-50.0f, fminf(50.0f, x))))))) + -0.008384f);\n}",
525
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((1.002747 * torch.log(torch.clamp((1.010159 + torch.exp(torch.clamp(x, -50.0, 50.0))), min=1e-30))) + -0.008384)",
524
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.002747f * logf(fmaxf(1.0e-30f, (1.010159f + expf(fmaxf(-50.0f, fminf(50.0f, x))))))) + -0.008384f);\n}",
525
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((1.002747 * torch.log(torch.clamp((1.010159 + torch.exp(torch.clamp(x, -50.0, 50.0))), min=1e-30))) + -0.008384)",
526
526
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AhUCA2VudgNleHAAAQNlbnYDbG9nAAEDAgEABwkBBXNwZWFyAAIKRgFEAEQDmDJwQAvwP0Q5Kcx7nCnwPyAARAAAAAAAAEnApUQAAAAAAABJQKQQAKBEoMLr/ktItDmlEAGiRB8xem6hK4G/oAs=",
527
527
  },
528
528
  fast: {
529
529
  js: "((x) => (((x + 6.630221)) * ((x + 6.630221)) * ((x + 6.630221)) + 239.762951))",
530
530
  eval: ((x) => (((x + 6.630221)) * ((x + 6.630221)) * ((x + 6.630221)) + 239.762951)),
531
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (powf((x + 6.630221f), 3.0f) + 239.762951f);\n}",
532
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (((x + 6.630221) ** 3) + 239.762951)",
531
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (powf((x + 6.630221f), 3.0f) + 239.762951f);\n}",
532
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (((x + 6.630221) ** 3) + 239.762951)",
533
533
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACjQBMgAgAER5AmGnWIUaQKAgAER5AmGnWIUaQKAgAER5AmGnWIUaQKCiokRqLjcYavhtQKAL",
534
534
  },
535
535
  meta: {
@@ -546,15 +546,15 @@ const kernels = {
546
546
  precise: {
547
547
  js: "((x) => ((-1.553578 * Math.max(Math.sqrt(Math.abs((6.660595 - Math.max(3.1671, x)))), 0.603662)) + 2.906087))",
548
548
  eval: ((x) => ((-1.553578 * Math.max(Math.sqrt(Math.abs((6.660595 - Math.max(3.1671, x)))), 0.603662)) + 2.906087)),
549
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-1.553578f * fmaxf(sqrtf(fabsf((6.660595f - fmaxf(3.1671f, x)))), 0.603662f)) + 2.906087f);\n}",
550
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-1.553578 * torch.maximum(torch.sqrt(torch.abs((6.660595 - torch.maximum(3.1671, x)))), 0.603662)) + 2.906087)",
549
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-1.553578f * fmaxf(sqrtf(fabsf((6.660595f - fmaxf(3.1671f, x)))), 0.603662f)) + 2.906087f);\n}",
550
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-1.553578 * torch.maximum(torch.sqrt(torch.abs((6.660595 - torch.maximum(3.1671, x)))), 0.603662)) + 2.906087)",
551
551
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACjoBOABEuI/cmnTb+L9Ev5oDBHOkGkBE9UpZhjhWCUAgAKWhmZ9EgdB6+DJR4z+lokRhpYKKqj8HQKAL",
552
552
  },
553
553
  fast: {
554
554
  js: "((t, x) => (((t) * (t) * Math.sin((4.822148 * t))) * (x * Math.sin((4.8694 * t)))))",
555
555
  eval: ((t, x) => (((t) * (t) * Math.sin((4.822148 * t))) * (x * Math.sin((4.8694 * t))))),
556
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((powf(t, 2.0f) * sinf((4.822148f * t))) * (x * sinf((4.8694f * t))));\n}",
557
- py: "import torch\n\ndef spear_fn(t, x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (((t * t) * torch.sin((4.822148 * t))) * (x * torch.sin((4.8694 * t))))",
556
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((powf(t, 2.0f) * sinf((4.822148f * t))) * (x * sinf((4.8694f * t))));\n}",
557
+ py: "import torch\n\ndef spear_fn(t, x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (((t * t) * torch.sin((4.822148 * t))) * (x * torch.sin((4.8694 * t))))",
558
558
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAILAQNlbnYDc2luAAEDAgEABwkBBXNwZWFyAAEKKgEoACAAIACiRCLjUSrhSRNAIACiEACiIAFE0ZFc/kN6E0AgAKIQAKKiCw==",
559
559
  },
560
560
  meta: {
@@ -571,15 +571,15 @@ const kernels = {
571
571
  precise: {
572
572
  js: "((b) => ((0.3991806798322823 * ((Math.min(1e4, Math.max(-1e4, (4.851947) / ((b) < 1e-4 && (b) > -1e-4 ? ((b) >= 0 ? 1e-4 : -1e-4) : (b)))) + Math.min(1e4, Math.max(-1e4, (5.364206) / (((-3.480154 + b)) < 1e-4 && ((-3.480154 + b)) > -1e-4 ? (((-3.480154 + b)) >= 0 ? 1e-4 : -1e-4) : ((-3.480154 + b)))))) + Math.min(1e4, Math.max(-1e4, (0.368529) / (((11.340686 + b)) < 1e-4 && ((11.340686 + b)) > -1e-4 ? (((11.340686 + b)) >= 0 ? 1e-4 : -1e-4) : ((11.340686 + b))))))) + -0.00039034216985437336))",
573
573
  eval: ((b) => ((0.3991806798322823 * ((Math.min(1e4, Math.max(-1e4, (4.851947) / ((b) < 1e-4 && (b) > -1e-4 ? ((b) >= 0 ? 1e-4 : -1e-4) : (b)))) + Math.min(1e4, Math.max(-1e4, (5.364206) / (((-3.480154 + b)) < 1e-4 && ((-3.480154 + b)) > -1e-4 ? (((-3.480154 + b)) >= 0 ? 1e-4 : -1e-4) : ((-3.480154 + b)))))) + Math.min(1e4, Math.max(-1e4, (0.368529) / (((11.340686 + b)) < 1e-4 && ((11.340686 + b)) > -1e-4 ? (((11.340686 + b)) >= 0 ? 1e-4 : -1e-4) : ((11.340686 + b))))))) + -0.00039034216985437336)),
574
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.399181f * ((fminf(fmaxf((4.851947f / copysignf(fmaxf(fabsf(b), 1.0e-4f), b)), -1.0e4f), 1.0e4f) + fminf(fmaxf((5.364206f / copysignf(fmaxf(fabsf((-3.480154f + b)), 1.0e-4f), (-3.480154f + b))), -1.0e4f), 1.0e4f)) + fminf(fmaxf((0.368529f / copysignf(fmaxf(fabsf((11.340686f + b)), 1.0e-4f), (11.340686f + b))), -1.0e4f), 1.0e4f))) + -0.00039f);\n}",
575
- py: "import torch\n\ndef spear_fn(b):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.399181 * (((4.851947 / (abs(b) < 1e-4 ? 1e-4 : b)) + (5.364206 / (abs((-3.480154 + b)) < 1e-4 ? 1e-4 : (-3.480154 + b)))) + (0.368529 / (abs((11.340686 + b)) < 1e-4 ? 1e-4 : (11.340686 + b))))) + -0.00039)",
574
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.399181f * ((fminf(fmaxf((4.851947f / copysignf(fmaxf(fabsf(b), 1.0e-4f), b)), -1.0e4f), 1.0e4f) + fminf(fmaxf((5.364206f / copysignf(fmaxf(fabsf((-3.480154f + b)), 1.0e-4f), (-3.480154f + b))), -1.0e4f), 1.0e4f)) + fminf(fmaxf((0.368529f / copysignf(fmaxf(fabsf((11.340686f + b)), 1.0e-4f), (11.340686f + b))), -1.0e4f), 1.0e4f))) + -0.00039f);\n}",
575
+ py: "import torch\n\ndef spear_fn(b):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.399181 * (((4.851947 / (abs(b) < 1e-4 ? 1e-4 : b)) + (5.364206 / (abs((-3.480154 + b)) < 1e-4 ? 1e-4 : (-3.480154 + b)))) + (0.368529 / (abs((11.340686 + b)) < 1e-4 ? 1e-4 : (11.340686 + b))))) + -0.00039)",
576
576
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACs0BAcoBAETfx0QfLYzZP0SFs1vLZGgTQCAAmUQtQxzr4jYaP6UgAKajRAAAAAAAiMPApUQAAAAAAIjDQKREJQfsavJ0FUBEQ1n4+lrXC8AgAKCZRC1DHOviNho/pURDWfj6WtcLwCAAoKajRAAAAAAAiMPApUQAAAAAAIjDQKSgRFYqqKj6ldc/RP1oOGVuriZAIACgmUQtQxzr4jYaP6VE/Wg4ZW6uJkAgAKCmo0QAAAAAAIjDwKVEAAAAAACIw0CkoKJEWfKQ2tqUOb+gCw==",
577
577
  },
578
578
  fast: {
579
579
  js: "((s, b) => Math.min(1e4, Math.max(-1e4, (s) / ((b) < 1e-4 && (b) > -1e-4 ? ((b) >= 0 ? 1e-4 : -1e-4) : (b)))))",
580
580
  eval: ((s, b) => Math.min(1e4, Math.max(-1e4, (s) / ((b) < 1e-4 && (b) > -1e-4 ? ((b) >= 0 ? 1e-4 : -1e-4) : (b))))),
581
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((s / copysignf(fmaxf(fabsf(b), 1.0e-4f), b)), -1.0e4f), 1.0e4f);\n}",
582
- py: "import torch\n\ndef spear_fn(s, b):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (s / (abs(b) < 1e-4 ? 1e-4 : b))",
581
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((s / copysignf(fmaxf(fabsf(b), 1.0e-4f), b)), -1.0e4f), 1.0e4f);\n}",
582
+ py: "import torch\n\ndef spear_fn(s, b):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (s / (abs(b) < 1e-4 ? 1e-4 : b))",
583
583
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAMCAQAHCQEFc3BlYXIAAAorASkAIAAgAZlELUMc6+I2Gj+lIAGmo0QAAAAAAIjDwKVEAAAAAACIw0CkCw==",
584
584
  },
585
585
  meta: {
@@ -596,8 +596,8 @@ const kernels = {
596
596
  precise: {
597
597
  js: "((d, th) => ((-0.4791144877035046 * ((d * Math.cos(th)) + Math.cos((-Math.max(0, d))))) + 0.19358895313254176))",
598
598
  eval: ((d, th) => ((-0.4791144877035046 * ((d * Math.cos(th)) + Math.cos((-Math.max(0, d))))) + 0.19358895313254176)),
599
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.479114f * ((d * cosf(th)) + cosf((-fmaxf(0.0f, d))))) + 0.193589f);\n}",
600
- py: "import torch\n\ndef spear_fn(d, th):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-0.479114 * ((d * torch.cos(th)) + torch.cos((-torch.relu(d))))) + 0.193589)",
599
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.479114f * ((d * cosf(th)) + cosf((-fmaxf(0.0f, d))))) + 0.193589f);\n}",
600
+ py: "import torch\n\ndef spear_fn(d, th):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-0.479114 * ((d * torch.cos(th)) + torch.cos((-torch.relu(d))))) + 0.193589)",
601
601
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAILAQNlbnYDY29zAAEDAgEABwkBBXNwZWFyAAEKLwEtAER2fO7Pz6nevyAAIAEQAKIgAEQAAAAAAAAAAKWaEACgokQ8G0nXhcfIP6AL",
602
602
  },
603
603
  meta: {
@@ -614,15 +614,15 @@ const kernels = {
614
614
  precise: {
615
615
  js: "((t, u, w) => ((1.000001 * ((t * 0.333333) + ((2 * Math.sqrt(Math.abs(((-(u - ((t) * (t) * 0.333333))) * 0.3333333333333333)))) * Math.cos(((1.5707963267948966 - Math.atan(Math.min(1e4, Math.max(-1e4, (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333)))))))))))) / ((Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333)))))))))))) * (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333))))))))))))))))) < 1e-4 && (Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333)))))))))))) * (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333))))))))))))))))) > -1e-4 ? ((Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333)))))))))))) * (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333))))))))))))))))) >= 0 ? 1e-4 : -1e-4) : (Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333)))))))))))) * (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333)))))))))))))))))))))) * 0.3333333333333333))))) + -0.0000019009293118870118))",
616
616
  eval: ((t, u, w) => ((1.000001 * ((t * 0.333333) + ((2 * Math.sqrt(Math.abs(((-(u - ((t) * (t) * 0.333333))) * 0.3333333333333333)))) * Math.cos(((1.5707963267948966 - Math.atan(Math.min(1e4, Math.max(-1e4, (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333)))))))))))) / ((Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333)))))))))))) * (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333))))))))))))))))) < 1e-4 && (Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333)))))))))))) * (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333))))))))))))))))) > -1e-4 ? ((Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333)))))))))))) * (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333))))))))))))))))) >= 0 ? 1e-4 : -1e-4) : (Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333)))))))))))) * (Math.min(1, Math.max(-1, (Math.min(1e4, Math.max(-1e4, ((3 * (((t * u) * 0.3333333333333333) - (((t) * (t) * (t) * 0.07407407407407407) + w)))) / (((2 * (u - ((t) * (t) * 0.3333333333333333)))) < 1e-4 && ((2 * (u - ((t) * (t) * 0.3333333333333333)))) > -1e-4 ? (((2 * (u - ((t) * (t) * 0.3333333333333333)))) >= 0 ? 1e-4 : -1e-4) : ((2 * (u - ((t) * (t) * 0.3333333333333333))))))) * Math.sqrt(Math.abs(Math.min(1e4, Math.max(-1e4, (-3) / (((u - ((t) * (t) * 0.3333333333333333))) < 1e-4 && ((u - ((t) * (t) * 0.3333333333333333))) > -1e-4 ? (((u - ((t) * (t) * 0.3333333333333333))) >= 0 ? 1e-4 : -1e-4) : ((u - ((t) * (t) * 0.3333333333333333)))))))))))))))))))))) * 0.3333333333333333))))) + -0.0000019009293118870118)),
617
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.000001f * ((t * 0.333333f) + ((2f * sqrtf(fabsf(((-(u - (powf(t, 2.0f) * 0.333333f))) * 0.333333f)))) * cosf(((1.570796f - atanf(fminf(fmaxf((fminf(1f, fmaxf(-1f, (fminf(fmaxf(((3f * (((t * u) * 0.333333f) - ((powf(t, 3.0f) * 0.074074f) + w))) / copysignf(fmaxf(fabsf((2f * (u - (powf(t, 2.0f) * 0.333333f)))), 1.0e-4f), (2f * (u - (powf(t, 2.0f) * 0.333333f))))), -1.0e4f), 1.0e4f) * sqrtf(fabsf(fminf(fmaxf((-3f / copysignf(fmaxf(fabsf((u - (powf(t, 2.0f) * 0.333333f))), 1.0e-4f), (u - (powf(t, 2.0f) * 0.333333f)))), -1.0e4f), 1.0e4f)))))) / copysignf(fmaxf(fabsf(sqrtf(fabsf(fabsf((1f - powf(fminf(1f, fmaxf(-1f, (fminf(fmaxf(((3f * (((t * u) * 0.333333f) - ((powf(t, 3.0f) * 0.074074f) + w))) / copysignf(fmaxf(fabsf((2f * (u - (powf(t, 2.0f) * 0.333333f)))), 1.0e-4f), (2f * (u - (powf(t, 2.0f) * 0.333333f))))), -1.0e4f), 1.0e4f) * sqrtf(fabsf(fminf(fmaxf((-3f / copysignf(fmaxf(fabsf((u - (powf(t, 2.0f) * 0.333333f))), 1.0e-4f), (u - (powf(t, 2.0f) * 0.333333f)))), -1.0e4f), 1.0e4f)))))), 2.0f)))))), 1.0e-4f), sqrtf(fabsf(fabsf((1f - powf(fminf(1f, fmaxf(-1f, (fminf(fmaxf(((3f * (((t * u) * 0.333333f) - ((powf(t, 3.0f) * 0.074074f) + w))) / copysignf(fmaxf(fabsf((2f * (u - (powf(t, 2.0f) * 0.333333f)))), 1.0e-4f), (2f * (u - (powf(t, 2.0f) * 0.333333f))))), -1.0e4f), 1.0e4f) * sqrtf(fabsf(fminf(fmaxf((-3f / copysignf(fmaxf(fabsf((u - (powf(t, 2.0f) * 0.333333f))), 1.0e-4f), (u - (powf(t, 2.0f) * 0.333333f)))), -1.0e4f), 1.0e4f)))))), 2.0f))))))), -1.0e4f), 1.0e4f))) * 0.333333f))))) + -0.000002f);\n}",
618
- py: "import torch\n\ndef spear_fn(t, u, w):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((1.000001 * ((t * 0.333333) + ((2 * torch.sqrt(torch.abs(((-(u - ((t * t) * 0.333333))) * 0.333333)))) * torch.cos(((1.570796 - torch.atan((torch.minimum(1, torch.maximum(-1, (((3 * (((t * u) * 0.333333) - (((t ** 3) * 0.074074) + w))) / (abs((2 * (u - ((t * t) * 0.333333)))) < 1e-4 ? 1e-4 : (2 * (u - ((t * t) * 0.333333))))) * torch.sqrt(torch.abs((-3 / (abs((u - ((t * t) * 0.333333))) < 1e-4 ? 1e-4 : (u - ((t * t) * 0.333333))))))))) / (abs(torch.sqrt(torch.abs(torch.abs((1 - (torch.minimum(1, torch.maximum(-1, (((3 * (((t * u) * 0.333333) - (((t ** 3) * 0.074074) + w))) / (abs((2 * (u - ((t * t) * 0.333333)))) < 1e-4 ? 1e-4 : (2 * (u - ((t * t) * 0.333333))))) * torch.sqrt(torch.abs((-3 / (abs((u - ((t * t) * 0.333333))) < 1e-4 ? 1e-4 : (u - ((t * t) * 0.333333))))))))) * torch.minimum(1, torch.maximum(-1, (((3 * (((t * u) * 0.333333) - (((t ** 3) * 0.074074) + w))) / (abs((2 * (u - ((t * t) * 0.333333)))) < 1e-4 ? 1e-4 : (2 * (u - ((t * t) * 0.333333))))) * torch.sqrt(torch.abs((-3 / (abs((u - ((t * t) * 0.333333))) < 1e-4 ? 1e-4 : (u - ((t * t) * 0.333333))))))))))))))) < 1e-4 ? 1e-4 : torch.sqrt(torch.abs(torch.abs((1 - (torch.minimum(1, torch.maximum(-1, (((3 * (((t * u) * 0.333333) - (((t ** 3) * 0.074074) + w))) / (abs((2 * (u - ((t * t) * 0.333333)))) < 1e-4 ? 1e-4 : (2 * (u - ((t * t) * 0.333333))))) * torch.sqrt(torch.abs((-3 / (abs((u - ((t * t) * 0.333333))) < 1e-4 ? 1e-4 : (u - ((t * t) * 0.333333))))))))) * torch.minimum(1, torch.maximum(-1, (((3 * (((t * u) * 0.333333) - (((t ** 3) * 0.074074) + w))) / (abs((2 * (u - ((t * t) * 0.333333)))) < 1e-4 ? 1e-4 : (2 * (u - ((t * t) * 0.333333))))) * torch.sqrt(torch.abs((-3 / (abs((u - ((t * t) * 0.333333))) < 1e-4 ? 1e-4 : (u - ((t * t) * 0.333333)))))))))))))))))) * 0.333333))))) + -0.000002)",
617
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.000001f * ((t * 0.333333f) + ((2f * sqrtf(fabsf(((-(u - (powf(t, 2.0f) * 0.333333f))) * 0.333333f)))) * cosf(((1.570796f - atanf(fminf(fmaxf((fminf(1f, fmaxf(-1f, (fminf(fmaxf(((3f * (((t * u) * 0.333333f) - ((powf(t, 3.0f) * 0.074074f) + w))) / copysignf(fmaxf(fabsf((2f * (u - (powf(t, 2.0f) * 0.333333f)))), 1.0e-4f), (2f * (u - (powf(t, 2.0f) * 0.333333f))))), -1.0e4f), 1.0e4f) * sqrtf(fabsf(fminf(fmaxf((-3f / copysignf(fmaxf(fabsf((u - (powf(t, 2.0f) * 0.333333f))), 1.0e-4f), (u - (powf(t, 2.0f) * 0.333333f)))), -1.0e4f), 1.0e4f)))))) / copysignf(fmaxf(fabsf(sqrtf(fabsf(fabsf((1f - powf(fminf(1f, fmaxf(-1f, (fminf(fmaxf(((3f * (((t * u) * 0.333333f) - ((powf(t, 3.0f) * 0.074074f) + w))) / copysignf(fmaxf(fabsf((2f * (u - (powf(t, 2.0f) * 0.333333f)))), 1.0e-4f), (2f * (u - (powf(t, 2.0f) * 0.333333f))))), -1.0e4f), 1.0e4f) * sqrtf(fabsf(fminf(fmaxf((-3f / copysignf(fmaxf(fabsf((u - (powf(t, 2.0f) * 0.333333f))), 1.0e-4f), (u - (powf(t, 2.0f) * 0.333333f)))), -1.0e4f), 1.0e4f)))))), 2.0f)))))), 1.0e-4f), sqrtf(fabsf(fabsf((1f - powf(fminf(1f, fmaxf(-1f, (fminf(fmaxf(((3f * (((t * u) * 0.333333f) - ((powf(t, 3.0f) * 0.074074f) + w))) / copysignf(fmaxf(fabsf((2f * (u - (powf(t, 2.0f) * 0.333333f)))), 1.0e-4f), (2f * (u - (powf(t, 2.0f) * 0.333333f))))), -1.0e4f), 1.0e4f) * sqrtf(fabsf(fminf(fmaxf((-3f / copysignf(fmaxf(fabsf((u - (powf(t, 2.0f) * 0.333333f))), 1.0e-4f), (u - (powf(t, 2.0f) * 0.333333f)))), -1.0e4f), 1.0e4f)))))), 2.0f))))))), -1.0e4f), 1.0e4f))) * 0.333333f))))) + -0.000002f);\n}",
618
+ py: "import torch\n\ndef spear_fn(t, u, w):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((1.000001 * ((t * 0.333333) + ((2 * torch.sqrt(torch.abs(((-(u - ((t * t) * 0.333333))) * 0.333333)))) * torch.cos(((1.570796 - torch.atan((torch.minimum(1, torch.maximum(-1, (((3 * (((t * u) * 0.333333) - (((t ** 3) * 0.074074) + w))) / (abs((2 * (u - ((t * t) * 0.333333)))) < 1e-4 ? 1e-4 : (2 * (u - ((t * t) * 0.333333))))) * torch.sqrt(torch.abs((-3 / (abs((u - ((t * t) * 0.333333))) < 1e-4 ? 1e-4 : (u - ((t * t) * 0.333333))))))))) / (abs(torch.sqrt(torch.abs(torch.abs((1 - (torch.minimum(1, torch.maximum(-1, (((3 * (((t * u) * 0.333333) - (((t ** 3) * 0.074074) + w))) / (abs((2 * (u - ((t * t) * 0.333333)))) < 1e-4 ? 1e-4 : (2 * (u - ((t * t) * 0.333333))))) * torch.sqrt(torch.abs((-3 / (abs((u - ((t * t) * 0.333333))) < 1e-4 ? 1e-4 : (u - ((t * t) * 0.333333))))))))) * torch.minimum(1, torch.maximum(-1, (((3 * (((t * u) * 0.333333) - (((t ** 3) * 0.074074) + w))) / (abs((2 * (u - ((t * t) * 0.333333)))) < 1e-4 ? 1e-4 : (2 * (u - ((t * t) * 0.333333))))) * torch.sqrt(torch.abs((-3 / (abs((u - ((t * t) * 0.333333))) < 1e-4 ? 1e-4 : (u - ((t * t) * 0.333333))))))))))))))) < 1e-4 ? 1e-4 : torch.sqrt(torch.abs(torch.abs((1 - (torch.minimum(1, torch.maximum(-1, (((3 * (((t * u) * 0.333333) - (((t ** 3) * 0.074074) + w))) / (abs((2 * (u - ((t * t) * 0.333333)))) < 1e-4 ? 1e-4 : (2 * (u - ((t * t) * 0.333333))))) * torch.sqrt(torch.abs((-3 / (abs((u - ((t * t) * 0.333333))) < 1e-4 ? 1e-4 : (u - ((t * t) * 0.333333))))))))) * torch.minimum(1, torch.maximum(-1, (((3 * (((t * u) * 0.333333) - (((t ** 3) * 0.074074) + w))) / (abs((2 * (u - ((t * t) * 0.333333)))) < 1e-4 ? 1e-4 : (2 * (u - ((t * t) * 0.333333))))) * torch.sqrt(torch.abs((-3 / (abs((u - ((t * t) * 0.333333))) < 1e-4 ? 1e-4 : (u - ((t * t) * 0.333333)))))))))))))))))) * 0.333333))))) + -0.000002)",
619
619
  wasmBase64: "AGFzbQEAAAABDQJgA3x8fAF8YAF8AXwCFgIDZW52A2NvcwABA2VudgRhdGFuAAEDAgEABwkBBXNwZWFyAAIKxgoBwwoARAt6bwwBAPA/IABERl1r71NV1T+iRAAAAAAAAABAIAEgACAAokRGXWvvU1XVP6KhmkRVVVVVVVXVP6KZn6JEGC1EVPsh+T9EAAAAAAAA8D9EAAAAAAAA8L9EAAAAAAAACEAgACABokRVVVVVVVXVP6IgACAAIACiokRoL6G9hPayP6IgAqChokQAAAAAAAAAQCABIAAgAKJEVVVVVVVV1T+ioaKZRC1DHOviNho/pUQAAAAAAAAAQCABIAAgAKJEVVVVVVVV1T+ioaKmo0QAAAAAAIjDwKVEAAAAAACIw0CkRAAAAAAAAAjAIAEgACAAokRVVVVVVVXVP6KhmUQtQxzr4jYaP6UgASAAIACiRFVVVVVVVdU/oqGmo0QAAAAAAIjDwKVEAAAAAACIw0CkmZ+ipaREAAAAAAAA8D9EAAAAAAAA8D9EAAAAAAAA8L9EAAAAAAAACEAgACABokRVVVVVVVXVP6IgACAAIACiokRoL6G9hPayP6IgAqChokQAAAAAAAAAQCABIAAgAKJEVVVVVVVV1T+ioaKZRC1DHOviNho/pUQAAAAAAAAAQCABIAAgAKJEVVVVVVVV1T+ioaKmo0QAAAAAAIjDwKVEAAAAAACIw0CkRAAAAAAAAAjAIAEgACAAokRVVVVVVVXVP6KhmUQtQxzr4jYaP6UgASAAIACiRFVVVVVVVdU/oqGmo0QAAAAAAIjDwKVEAAAAAACIw0CkmZ+ipaREAAAAAAAA8D9EAAAAAAAA8L9EAAAAAAAACEAgACABokRVVVVVVVXVP6IgACAAIACiokRoL6G9hPayP6IgAqChokQAAAAAAAAAQCABIAAgAKJEVVVVVVVV1T+ioaKZRC1DHOviNho/pUQAAAAAAAAAQCABIAAgAKJEVVVVVVVV1T+ioaKmo0QAAAAAAIjDwKVEAAAAAACIw0CkRAAAAAAAAAjAIAEgACAAokRVVVVVVVXVP6KhmUQtQxzr4jYaP6UgASAAIACiRFVVVVVVVdU/oqGmo0QAAAAAAIjDwKVEAAAAAACIw0CkmZ+ipaSioZmZn5lELUMc6+I2Gj+lRAAAAAAAAPA/RAAAAAAAAPA/RAAAAAAAAPC/RAAAAAAAAAhAIAAgAaJEVVVVVVVV1T+iIAAgACAAoqJEaC+hvYT2sj+iIAKgoaJEAAAAAAAAAEAgASAAIACiRFVVVVVVVdU/oqGimUQtQxzr4jYaP6VEAAAAAAAAAEAgASAAIACiRFVVVVVVVdU/oqGipqNEAAAAAACIw8ClRAAAAAAAiMNApEQAAAAAAAAIwCABIAAgAKJEVVVVVVVV1T+ioZlELUMc6+I2Gj+lIAEgACAAokRVVVVVVVXVP6KhpqNEAAAAAACIw8ClRAAAAAAAiMNApJmfoqWkRAAAAAAAAPA/RAAAAAAAAPC/RAAAAAAAAAhAIAAgAaJEVVVVVVVV1T+iIAAgACAAoqJEaC+hvYT2sj+iIAKgoaJEAAAAAAAAAEAgASAAIACiRFVVVVVVVdU/oqGimUQtQxzr4jYaP6VEAAAAAAAAAEAgASAAIACiRFVVVVVVVdU/oqGipqNEAAAAAACIw8ClRAAAAAAAiMNApEQAAAAAAAAIwCABIAAgAKJEVVVVVVVV1T+ioZlELUMc6+I2Gj+lIAEgACAAokRVVVVVVVXVP6KhpqNEAAAAAACIw8ClRAAAAAAAiMNApJmfoqWkoqGZmZ+mo0QAAAAAAIjDwKVEAAAAAACIw0CkEAGhRFVVVVVVVdU/ohAAoqCiRIPAyuFt5L++oAs=",
620
620
  },
621
621
  fast: {
622
622
  js: "((t, u, w) => ((-0.07380655703135926 * (Math.min(((-7.599615 * t) - (-u)), Math.abs(t)) - (t + (w - (2.202856 * u))))) + 0.9412449424916474))",
623
623
  eval: ((t, u, w) => ((-0.07380655703135926 * (Math.min(((-7.599615 * t) - (-u)), Math.abs(t)) - (t + (w - (2.202856 * u))))) + 0.9412449424916474)),
624
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.073807f * (fminf(((-7.599615f * t) - (-u)), fabsf(t)) - (t + (w - (2.202856f * u))))) + 0.941245f);\n}",
625
- py: "import torch\n\ndef spear_fn(t, u, w):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-0.073807 * (torch.minimum(((-7.599615 * t) - (-u)), torch.abs(t)) - (t + (w - (2.202856 * u))))) + 0.941245)",
624
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.073807f * (fminf(((-7.599615f * t) - (-u)), fabsf(t)) - (t + (w - (2.202856f * u))))) + 0.941245f);\n}",
625
+ py: "import torch\n\ndef spear_fn(t, u, w):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-0.073807 * (torch.minimum(((-7.599615 * t) - (-u)), torch.abs(t)) - (t + (w - (2.202856 * u))))) + 0.941245)",
626
626
  wasmBase64: "AGFzbQEAAAABDQJgA3x8fAF8YAF8AXwDAgEABwkBBXNwZWFyAAAKPwE9AESNF66M/OSyv0Sgw3x5AWYewCAAoiABmqEgAJmkIAAgAkQHYW73cp8BQCABoqGgoaJEZt2wtq0e7j+gCw==",
627
627
  },
628
628
  meta: {
@@ -639,15 +639,15 @@ const kernels = {
639
639
  precise: {
640
640
  js: "((d, l2, l3) => (1.5707963267948966 - Math.atan(Math.min(1e4, Math.max(-1e4, (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3))))))) / ((Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3))))))) * (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3)))))))))))) < 1e-4 && (Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3))))))) * (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3)))))))))))) > -1e-4 ? ((Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3))))))) * (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3)))))))))))) >= 0 ? 1e-4 : -1e-4) : (Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3))))))) * (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3))))))))))))))))))",
641
641
  eval: ((d, l2, l3) => (1.5707963267948966 - Math.atan(Math.min(1e4, Math.max(-1e4, (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3))))))) / ((Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3))))))) * (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3)))))))))))) < 1e-4 && (Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3))))))) * (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3)))))))))))) > -1e-4 ? ((Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3))))))) * (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3)))))))))))) >= 0 ? 1e-4 : -1e-4) : (Math.sqrt(Math.abs(Math.abs((1 - (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3))))))) * (Math.min(1e4, Math.max(-1e4, (((d) * (d) - ((l2) * (l2) + (l3) * (l3)))) / (((2 * (l2 * l3))) < 1e-4 && ((2 * (l2 * l3))) > -1e-4 ? (((2 * (l2 * l3))) >= 0 ? 1e-4 : -1e-4) : ((2 * (l2 * l3)))))))))))))))))),
642
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (1.570796f - atanf(fminf(fmaxf((fminf(fmaxf(((powf(d, 2.0f) - (powf(l2, 2.0f) + powf(l3, 2.0f))) / copysignf(fmaxf(fabsf((2f * (l2 * l3))), 1.0e-4f), (2f * (l2 * l3)))), -1.0e4f), 1.0e4f) / copysignf(fmaxf(fabsf(sqrtf(fabsf(fabsf((1f - powf(fminf(fmaxf(((powf(d, 2.0f) - (powf(l2, 2.0f) + powf(l3, 2.0f))) / copysignf(fmaxf(fabsf((2f * (l2 * l3))), 1.0e-4f), (2f * (l2 * l3)))), -1.0e4f), 1.0e4f), 2.0f)))))), 1.0e-4f), sqrtf(fabsf(fabsf((1f - powf(fminf(fmaxf(((powf(d, 2.0f) - (powf(l2, 2.0f) + powf(l3, 2.0f))) / copysignf(fmaxf(fabsf((2f * (l2 * l3))), 1.0e-4f), (2f * (l2 * l3)))), -1.0e4f), 1.0e4f), 2.0f))))))), -1.0e4f), 1.0e4f)));\n}",
643
- py: "import torch\n\ndef spear_fn(d, l2, l3):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (1.570796 - torch.atan(((((d * d) - ((l2 * l2) + (l3 * l3))) / (abs((2 * (l2 * l3))) < 1e-4 ? 1e-4 : (2 * (l2 * l3)))) / (abs(torch.sqrt(torch.abs(torch.abs((1 - ((((d * d) - ((l2 * l2) + (l3 * l3))) / (abs((2 * (l2 * l3))) < 1e-4 ? 1e-4 : (2 * (l2 * l3)))) * (((d * d) - ((l2 * l2) + (l3 * l3))) / (abs((2 * (l2 * l3))) < 1e-4 ? 1e-4 : (2 * (l2 * l3)))))))))) < 1e-4 ? 1e-4 : torch.sqrt(torch.abs(torch.abs((1 - ((((d * d) - ((l2 * l2) + (l3 * l3))) / (abs((2 * (l2 * l3))) < 1e-4 ? 1e-4 : (2 * (l2 * l3)))) * (((d * d) - ((l2 * l2) + (l3 * l3))) / (abs((2 * (l2 * l3))) < 1e-4 ? 1e-4 : (2 * (l2 * l3)))))))))))))",
642
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (1.570796f - atanf(fminf(fmaxf((fminf(fmaxf(((powf(d, 2.0f) - (powf(l2, 2.0f) + powf(l3, 2.0f))) / copysignf(fmaxf(fabsf((2f * (l2 * l3))), 1.0e-4f), (2f * (l2 * l3)))), -1.0e4f), 1.0e4f) / copysignf(fmaxf(fabsf(sqrtf(fabsf(fabsf((1f - powf(fminf(fmaxf(((powf(d, 2.0f) - (powf(l2, 2.0f) + powf(l3, 2.0f))) / copysignf(fmaxf(fabsf((2f * (l2 * l3))), 1.0e-4f), (2f * (l2 * l3)))), -1.0e4f), 1.0e4f), 2.0f)))))), 1.0e-4f), sqrtf(fabsf(fabsf((1f - powf(fminf(fmaxf(((powf(d, 2.0f) - (powf(l2, 2.0f) + powf(l3, 2.0f))) / copysignf(fmaxf(fabsf((2f * (l2 * l3))), 1.0e-4f), (2f * (l2 * l3)))), -1.0e4f), 1.0e4f), 2.0f))))))), -1.0e4f), 1.0e4f)));\n}",
643
+ py: "import torch\n\ndef spear_fn(d, l2, l3):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (1.570796 - torch.atan(((((d * d) - ((l2 * l2) + (l3 * l3))) / (abs((2 * (l2 * l3))) < 1e-4 ? 1e-4 : (2 * (l2 * l3)))) / (abs(torch.sqrt(torch.abs(torch.abs((1 - ((((d * d) - ((l2 * l2) + (l3 * l3))) / (abs((2 * (l2 * l3))) < 1e-4 ? 1e-4 : (2 * (l2 * l3)))) * (((d * d) - ((l2 * l2) + (l3 * l3))) / (abs((2 * (l2 * l3))) < 1e-4 ? 1e-4 : (2 * (l2 * l3)))))))))) < 1e-4 ? 1e-4 : torch.sqrt(torch.abs(torch.abs((1 - ((((d * d) - ((l2 * l2) + (l3 * l3))) / (abs((2 * (l2 * l3))) < 1e-4 ? 1e-4 : (2 * (l2 * l3)))) * (((d * d) - ((l2 * l2) + (l3 * l3))) / (abs((2 * (l2 * l3))) < 1e-4 ? 1e-4 : (2 * (l2 * l3)))))))))))))",
644
644
  wasmBase64: "AGFzbQEAAAABDQJgA3x8fAF8YAF8AXwCDAEDZW52BGF0YW4AAQMCAQAHCQEFc3BlYXIAAQreAwHbAwBEGC1EVPsh+T8gACAAoiABIAGiIAIgAqKgoUQAAAAAAAAAQCABIAKioplELUMc6+I2Gj+lRAAAAAAAAABAIAEgAqKipqNEAAAAAACIw8ClRAAAAAAAiMNApEQAAAAAAADwPyAAIACiIAEgAaIgAiACoqChRAAAAAAAAABAIAEgAqKimUQtQxzr4jYaP6VEAAAAAAAAAEAgASACoqKmo0QAAAAAAIjDwKVEAAAAAACIw0CkIAAgAKIgASABoiACIAKioKFEAAAAAAAAAEAgASACoqKZRC1DHOviNho/pUQAAAAAAAAAQCABIAKioqajRAAAAAAAiMPApUQAAAAAAIjDQKSioZmZn5lELUMc6+I2Gj+lRAAAAAAAAPA/IAAgAKIgASABoiACIAKioKFEAAAAAAAAAEAgASACoqKZRC1DHOviNho/pUQAAAAAAAAAQCABIAKioqajRAAAAAAAiMPApUQAAAAAAIjDQKQgACAAoiABIAGiIAIgAqKgoUQAAAAAAAAAQCABIAKioplELUMc6+I2Gj+lRAAAAAAAAABAIAEgAqKipqNEAAAAAACIw8ClRAAAAAAAiMNApKKhmZmfpqNEAAAAAACIw8ClRAAAAAAAiMNApBAAoQs=",
645
645
  },
646
646
  fast: {
647
647
  js: "((l3, d, l2) => ((-0.1606079676705464 * ((Math.min(1e4, Math.max(-1e4, (4.080818) / ((l3) < 1e-4 && (l3) > -1e-4 ? ((l3) >= 0 ? 1e-4 : -1e-4) : (l3)))) * (Math.max(d, l3) - l2)) - (Math.min(1e4, Math.max(-1e4, (5.542562) / ((l2) < 1e-4 && (l2) > -1e-4 ? ((l2) >= 0 ? 1e-4 : -1e-4) : (l2)))) * (l3 - d)))) + 2.18792552115997))",
648
648
  eval: ((l3, d, l2) => ((-0.1606079676705464 * ((Math.min(1e4, Math.max(-1e4, (4.080818) / ((l3) < 1e-4 && (l3) > -1e-4 ? ((l3) >= 0 ? 1e-4 : -1e-4) : (l3)))) * (Math.max(d, l3) - l2)) - (Math.min(1e4, Math.max(-1e4, (5.542562) / ((l2) < 1e-4 && (l2) > -1e-4 ? ((l2) >= 0 ? 1e-4 : -1e-4) : (l2)))) * (l3 - d)))) + 2.18792552115997)),
649
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.160608f * ((fminf(fmaxf((4.080818f / copysignf(fmaxf(fabsf(l3), 1.0e-4f), l3)), -1.0e4f), 1.0e4f) * (fmaxf(d, l3) - l2)) - (fminf(fmaxf((5.542562f / copysignf(fmaxf(fabsf(l2), 1.0e-4f), l2)), -1.0e4f), 1.0e4f) * (l3 - d)))) + 2.187926f);\n}",
650
- py: "import torch\n\ndef spear_fn(l3, d, l2):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-0.160608 * (((4.080818 / (abs(l3) < 1e-4 ? 1e-4 : l3)) * (torch.maximum(d, l3) - l2)) - ((5.542562 / (abs(l2) < 1e-4 ? 1e-4 : l2)) * (l3 - d)))) + 2.187926)",
649
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.160608f * ((fminf(fmaxf((4.080818f / copysignf(fmaxf(fabsf(l3), 1.0e-4f), l3)), -1.0e4f), 1.0e4f) * (fmaxf(d, l3) - l2)) - (fminf(fmaxf((5.542562f / copysignf(fmaxf(fabsf(l2), 1.0e-4f), l2)), -1.0e4f), 1.0e4f) * (l3 - d)))) + 2.187926f);\n}",
650
+ py: "import torch\n\ndef spear_fn(l3, d, l2):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-0.160608 * (((4.080818 / (abs(l3) < 1e-4 ? 1e-4 : l3)) * (torch.maximum(d, l3) - l2)) - ((5.542562 / (abs(l2) < 1e-4 ? 1e-4 : l2)) * (l3 - d)))) + 2.187926)",
651
651
  wasmBase64: "AGFzbQEAAAABDQJgA3x8fAF8YAF8AXwDAgEABwkBBXNwZWFyAAAKhQEBggEARGueT0jNjsS/RGe2K/TBUhBAIACZRC1DHOviNho/pSAApqNEAAAAAACIw8ClRAAAAAAAiMNApCABIAClIAKhokScNXhflSsWQCACmUQtQxzr4jYaP6UgAqajRAAAAAAAiMPApUQAAAAAAIjDQKQgACABoaKhokQEunsY34ABQKAL",
652
652
  },
653
653
  meta: {
@@ -664,15 +664,15 @@ const kernels = {
664
664
  precise: {
665
665
  js: "((v, dv, s) => ((1.825166 * Math.min(1.9, Math.max(-5.198308, ((0.840532 - (((v) * (v)) * ((v) * (v)) * 0.000001)) - (Math.min(1e4, Math.max(-1e4, ((2.393229 + Math.max(-0.435303, ((v * 1.543892) + ((v * dv) * 0.212766))))) / ((s) < 1e-4 && (s) > -1e-4 ? ((s) >= 0 ? 1e-4 : -1e-4) : (s))))) * (Math.min(1e4, Math.max(-1e4, ((2.393229 + Math.max(-0.435303, ((v * 1.543892) + ((v * dv) * 0.212766))))) / ((s) < 1e-4 && (s) > -1e-4 ? ((s) >= 0 ? 1e-4 : -1e-4) : (s))))))))) + 0.4862064122902764))",
666
666
  eval: ((v, dv, s) => ((1.825166 * Math.min(1.9, Math.max(-5.198308, ((0.840532 - (((v) * (v)) * ((v) * (v)) * 0.000001)) - (Math.min(1e4, Math.max(-1e4, ((2.393229 + Math.max(-0.435303, ((v * 1.543892) + ((v * dv) * 0.212766))))) / ((s) < 1e-4 && (s) > -1e-4 ? ((s) >= 0 ? 1e-4 : -1e-4) : (s))))) * (Math.min(1e4, Math.max(-1e4, ((2.393229 + Math.max(-0.435303, ((v * 1.543892) + ((v * dv) * 0.212766))))) / ((s) < 1e-4 && (s) > -1e-4 ? ((s) >= 0 ? 1e-4 : -1e-4) : (s))))))))) + 0.4862064122902764)),
667
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.825166f * fminf(1.9f, fmaxf(-5.198308f, ((0.840532f - (powf(powf(v, 2.0f), 2.0f) * 0.000001f)) - powf(fminf(fmaxf(((2.393229f + fmaxf(-0.435303f, ((v * 1.543892f) + ((v * dv) * 0.212766f)))) / copysignf(fmaxf(fabsf(s), 1.0e-4f), s)), -1.0e4f), 1.0e4f), 2.0f))))) + 0.486206f);\n}",
668
- py: "import torch\n\ndef spear_fn(v, dv, s):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((1.825166 * torch.minimum(1.9, torch.maximum(-5.198308, ((0.840532 - (((v * v) * (v * v)) * 0.000001)) - (((2.393229 + torch.maximum(-0.435303, ((v * 1.543892) + ((v * dv) * 0.212766)))) / (abs(s) < 1e-4 ? 1e-4 : s)) * ((2.393229 + torch.maximum(-0.435303, ((v * 1.543892) + ((v * dv) * 0.212766)))) / (abs(s) < 1e-4 ? 1e-4 : s))))))) + 0.486206)",
667
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.825166f * fminf(1.9f, fmaxf(-5.198308f, ((0.840532f - (powf(powf(v, 2.0f), 2.0f) * 0.000001f)) - powf(fminf(fmaxf(((2.393229f + fmaxf(-0.435303f, ((v * 1.543892f) + ((v * dv) * 0.212766f)))) / copysignf(fmaxf(fabsf(s), 1.0e-4f), s)), -1.0e4f), 1.0e4f), 2.0f))))) + 0.486206f);\n}",
668
+ py: "import torch\n\ndef spear_fn(v, dv, s):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((1.825166 * torch.minimum(1.9, torch.maximum(-5.198308, ((0.840532 - (((v * v) * (v * v)) * 0.000001)) - (((2.393229 + torch.maximum(-0.435303, ((v * 1.543892) + ((v * dv) * 0.212766)))) / (abs(s) < 1e-4 ? 1e-4 : s)) * ((2.393229 + torch.maximum(-0.435303, ((v * 1.543892) + ((v * dv) * 0.212766)))) / (abs(s) < 1e-4 ? 1e-4 : s))))))) + 0.486206)",
669
669
  wasmBase64: "AGFzbQEAAAABDQJgA3x8fAF8YAF8AXwDAgEABwkBBXNwZWFyAAAK+AEB9QEARJNWfEPhM/0/RGZmZmZmZv4/RAMkmkARyxTARCO6Z12j5eo/IAAgAKIgACAAoqJEje21oPfGsD6ioUTUtfY+VSUDQESscTYdAdzbvyAARILlCBnIs/g/oiAAIAGiRLix2ZHqO8s/oqCloCACmUQtQxzr4jYaP6UgAqajRAAAAAAAiMPApUQAAAAAAIjDQKRE1LX2PlUlA0BErHE2HQHc278gAESC5QgZyLP4P6IgACABokS4sdmR6jvLP6KgpaAgAplELUMc6+I2Gj+lIAKmo0QAAAAAAIjDwKVEAAAAAACIw0CkoqGlpKJEShr5fwEe3z+gCw==",
670
670
  },
671
671
  fast: {
672
672
  js: "((v, dv, s) => ((1.1414205468162575 * ((1.22047 * Math.min(1.9, Math.max(-7.31, ((1 - (((v) * (v)) * ((v) * (v)) * 0.000001)) - (Math.min(1e4, Math.max(-1e4, ((3.45 + Math.max(-0.05, ((v * 1.45) + ((v * dv) * 0.212766))))) / ((s) < 1e-4 && (s) > -1e-4 ? ((s) >= 0 ? 1e-4 : -1e-4) : (s))))) * (Math.min(1e4, Math.max(-1e4, ((3.45 + Math.max(-0.05, ((v * 1.45) + ((v * dv) * 0.212766))))) / ((s) < 1e-4 && (s) > -1e-4 ? ((s) >= 0 ? 1e-4 : -1e-4) : (s))))))))) + 0.215661)) + 0.024217427345017313))",
673
673
  eval: ((v, dv, s) => ((1.1414205468162575 * ((1.22047 * Math.min(1.9, Math.max(-7.31, ((1 - (((v) * (v)) * ((v) * (v)) * 0.000001)) - (Math.min(1e4, Math.max(-1e4, ((3.45 + Math.max(-0.05, ((v * 1.45) + ((v * dv) * 0.212766))))) / ((s) < 1e-4 && (s) > -1e-4 ? ((s) >= 0 ? 1e-4 : -1e-4) : (s))))) * (Math.min(1e4, Math.max(-1e4, ((3.45 + Math.max(-0.05, ((v * 1.45) + ((v * dv) * 0.212766))))) / ((s) < 1e-4 && (s) > -1e-4 ? ((s) >= 0 ? 1e-4 : -1e-4) : (s))))))))) + 0.215661)) + 0.024217427345017313)),
674
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.141421f * ((1.22047f * fminf(1.9f, fmaxf(-7.31f, ((1f - (powf(powf(v, 2.0f), 2.0f) * 0.000001f)) - powf(fminf(fmaxf(((3.45f + fmaxf(-0.05f, ((v * 1.45f) + ((v * dv) * 0.212766f)))) / copysignf(fmaxf(fabsf(s), 1.0e-4f), s)), -1.0e4f), 1.0e4f), 2.0f))))) + 0.215661f)) + 0.024217f);\n}",
675
- py: "import torch\n\ndef spear_fn(v, dv, s):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((1.141421 * ((1.22047 * torch.minimum(1.9, torch.maximum(-7.31, ((1 - (((v * v) * (v * v)) * 0.000001)) - (((3.45 + torch.maximum(-0.05, ((v * 1.45) + ((v * dv) * 0.212766)))) / (abs(s) < 1e-4 ? 1e-4 : s)) * ((3.45 + torch.maximum(-0.05, ((v * 1.45) + ((v * dv) * 0.212766)))) / (abs(s) < 1e-4 ? 1e-4 : s))))))) + 0.215661)) + 0.024217)",
674
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.141421f * ((1.22047f * fminf(1.9f, fmaxf(-7.31f, ((1f - (powf(powf(v, 2.0f), 2.0f) * 0.000001f)) - powf(fminf(fmaxf(((3.45f + fmaxf(-0.05f, ((v * 1.45f) + ((v * dv) * 0.212766f)))) / copysignf(fmaxf(fabsf(s), 1.0e-4f), s)), -1.0e4f), 1.0e4f), 2.0f))))) + 0.215661f)) + 0.024217f);\n}",
675
+ py: "import torch\n\ndef spear_fn(v, dv, s):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((1.141421 * ((1.22047 * torch.minimum(1.9, torch.maximum(-7.31, ((1 - (((v * v) * (v * v)) * 0.000001)) - (((3.45 + torch.maximum(-0.05, ((v * 1.45) + ((v * dv) * 0.212766)))) / (abs(s) < 1e-4 ? 1e-4 : s)) * ((3.45 + torch.maximum(-0.05, ((v * 1.45) + ((v * dv) * 0.212766)))) / (abs(s) < 1e-4 ? 1e-4 : s))))))) + 0.215661)) + 0.024217)",
676
676
  wasmBase64: "AGFzbQEAAAABDQJgA3x8fAF8YAF8AXwDAgEABwkBBXNwZWFyAAAKjAIBiQIARKXu+DBCQ/I/RGX8+4wLh/M/RGZmZmZmZv4/RD0K16NwPR3ARAAAAAAAAPA/IAAgAKIgACAAoqJEje21oPfGsD6ioUSamZmZmZkLQESamZmZmZmpvyAARDMzMzMzM/c/oiAAIAGiRLix2ZHqO8s/oqCloCACmUQtQxzr4jYaP6UgAqajRAAAAAAAiMPApUQAAAAAAIjDQKREmpmZmZmZC0BEmpmZmZmZqb8gAEQzMzMzMzP3P6IgACABokS4sdmR6jvLP6KgpaAgAplELUMc6+I2Gj+lIAKmo0QAAAAAAIjDwKVEAAAAAACIw0CkoqGlpKJEZOYCl8eayz+gokQCq8IJdMyYP6AL",
677
677
  },
678
678
  meta: {
@@ -689,15 +689,15 @@ const kernels = {
689
689
  precise: {
690
690
  js: "((x0, x1, x2, x3) => ((0.50938 * ((((x0 * 0.823) - (x1 * 0.476)) + ((x2 * 1.1) + (x3 * -0.299373))) + (((x0 * 0.82) - (x1 * 0.47)) + ((x2 * 1.093449) + (x3 * -0.28054))))) + 0.000005039899341391374))",
691
691
  eval: ((x0, x1, x2, x3) => ((0.50938 * ((((x0 * 0.823) - (x1 * 0.476)) + ((x2 * 1.1) + (x3 * -0.299373))) + (((x0 * 0.82) - (x1 * 0.47)) + ((x2 * 1.093449) + (x3 * -0.28054))))) + 0.000005039899341391374)),
692
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.50938f * ((((x0 * 0.823f) - (x1 * 0.476f)) + ((x2 * 1.1f) + (x3 * -0.299373f))) + (((x0 * 0.82f) - (x1 * 0.47f)) + ((x2 * 1.093449f) + (x3 * -0.28054f))))) + 0.000005f);\n}",
693
- py: "import torch\n\ndef spear_fn(x0, x1, x2, x3):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.50938 * ((((x0 * 0.823) - (x1 * 0.476)) + ((x2 * 1.1) + (x3 * -0.299373))) + (((x0 * 0.82) - (x1 * 0.47)) + ((x2 * 1.093449) + (x3 * -0.28054))))) + 0.000005)",
692
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.50938f * ((((x0 * 0.823f) - (x1 * 0.476f)) + ((x2 * 1.1f) + (x3 * -0.299373f))) + (((x0 * 0.82f) - (x1 * 0.47f)) + ((x2 * 1.093449f) + (x3 * -0.28054f))))) + 0.000005f);\n}",
693
+ py: "import torch\n\ndef spear_fn(x0, x1, x2, x3):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.50938 * ((((x0 * 0.823) - (x1 * 0.476)) + ((x2 * 1.1) + (x3 * -0.299373))) + (((x0 * 0.82) - (x1 * 0.47)) + ((x2 * 1.093449) + (x3 * -0.28054))))) + 0.000005)",
694
694
  wasmBase64: "AGFzbQEAAAABDgJgBHx8fHwBfGABfAF8AwIBAAcJAQVzcGVhcgAACn8BfQBEP5EnSddM4D8gAES8dJMYBFbqP6IgAUQQWDm0yHbeP6KhIAJEmpmZmZmZ8T+iIANEzosTX+0o07+ioKAgAEQ9CtejcD3qP6IgAUQUrkfhehTeP6KhIAJEoYDtYMR+8T+iIANE3BFOC1700b+ioKCgokQAgG/7jCPVPqAL",
695
695
  },
696
696
  fast: {
697
697
  js: "((x0, x1, x2, x3) => (((x0 * 0.82) - (x1 * 0.470006)) + ((x2 * 1.1) + (x3 * -0.290238))))",
698
698
  eval: ((x0, x1, x2, x3) => (((x0 * 0.82) - (x1 * 0.470006)) + ((x2 * 1.1) + (x3 * -0.290238)))),
699
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (((x0 * 0.82f) - (x1 * 0.470006f)) + ((x2 * 1.1f) + (x3 * -0.290238f)));\n}",
700
- py: "import torch\n\ndef spear_fn(x0, x1, x2, x3):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (((x0 * 0.82) - (x1 * 0.470006)) + ((x2 * 1.1) + (x3 * -0.290238)))",
699
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (((x0 * 0.82f) - (x1 * 0.470006f)) + ((x2 * 1.1f) + (x3 * -0.290238f)));\n}",
700
+ py: "import torch\n\ndef spear_fn(x0, x1, x2, x3):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (((x0 * 0.82) - (x1 * 0.470006)) + ((x2 * 1.1) + (x3 * -0.290238)))",
701
701
  wasmBase64: "AGFzbQEAAAABDgJgBHx8fHwBfGABfAF8AwIBAAcJAQVzcGVhcgAACjcBNQAgAEQ9CtejcD3qP6IgAUQlH7sLlBTeP6KhIAJEmpmZmZmZ8T+iIANE2JyDZ0KT0r+ioKAL",
702
702
  },
703
703
  meta: {
@@ -714,8 +714,8 @@ const kernels = {
714
714
  precise: {
715
715
  js: "((th, y, x) => ((-(Math.sin(th) * y)) + (x * Math.cos(th))))",
716
716
  eval: ((th, y, x) => ((-(Math.sin(th) * y)) + (x * Math.cos(th)))),
717
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-(sinf(th) * y)) + (x * cosf(th)));\n}",
718
- py: "import torch\n\ndef spear_fn(th, y, x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-(torch.sin(th) * y)) + (x * torch.cos(th)))",
717
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-(sinf(th) * y)) + (x * cosf(th)));\n}",
718
+ py: "import torch\n\ndef spear_fn(th, y, x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-(torch.sin(th) * y)) + (x * torch.cos(th)))",
719
719
  wasmBase64: "AGFzbQEAAAABDQJgA3x8fAF8YAF8AXwCFQIDZW52A3NpbgABA2VudgNjb3MAAQMCAQAHCQEFc3BlYXIAAgoUARIAIAAQACABopogAiAAEAGioAs=",
720
720
  },
721
721
  meta: {
@@ -732,8 +732,8 @@ const kernels = {
732
732
  precise: {
733
733
  js: "((x) => Math.sqrt(Math.abs(Math.exp(Math.max(-50, Math.min(50, (-(x) * (x))))))))",
734
734
  eval: ((x) => Math.sqrt(Math.abs(Math.exp(Math.max(-50, Math.min(50, (-(x) * (x)))))))),
735
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return sqrtf(fabsf(expf(fmaxf(-50.0f, fminf(50.0f, (-powf(x, 2.0f)))))));\n}",
736
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.sqrt(torch.abs(torch.exp(torch.clamp((-(x * x)), -50.0, 50.0))))",
735
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return sqrtf(fabsf(expf(fmaxf(-50.0f, fminf(50.0f, (-powf(x, 2.0f)))))));\n}",
736
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.sqrt(torch.abs(torch.exp(torch.clamp((-(x * x)), -50.0, 50.0))))",
737
737
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNleHAAAQMCAQAHCQEFc3BlYXIAAQoiASAAIAAgAKKaRAAAAAAAAEnApUQAAAAAAABJQKQQAJmfCw==",
738
738
  },
739
739
  meta: {
@@ -750,15 +750,15 @@ const kernels = {
750
750
  precise: {
751
751
  js: "((x) => ((1.1927736194522371 * ((2 * Math.min(1e4, Math.max(-1e4, (x) / (((x + 0.745653)) < 1e-4 && ((x + 0.745653)) > -1e-4 ? (((x + 0.745653)) >= 0 ? 1e-4 : -1e-4) : ((x + 0.745653)))))) - ((x) * (x) * Math.max(x, 0.692832)))) + 0.000008971056841264869))",
752
752
  eval: ((x) => ((1.1927736194522371 * ((2 * Math.min(1e4, Math.max(-1e4, (x) / (((x + 0.745653)) < 1e-4 && ((x + 0.745653)) > -1e-4 ? (((x + 0.745653)) >= 0 ? 1e-4 : -1e-4) : ((x + 0.745653)))))) - ((x) * (x) * Math.max(x, 0.692832)))) + 0.000008971056841264869)),
753
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.192774f * ((2f * fminf(fmaxf((x / copysignf(fmaxf(fabsf((x + 0.745653f)), 1.0e-4f), (x + 0.745653f))), -1.0e4f), 1.0e4f)) - (powf(x, 2.0f) * fmaxf(x, 0.692832f)))) + 0.000009f);\n}",
754
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((1.192774 * ((2 * (x / (abs((x + 0.745653)) < 1e-4 ? 1e-4 : (x + 0.745653)))) - ((x * x) * torch.maximum(x, 0.692832)))) + 0.000009)",
753
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.192774f * ((2f * fminf(fmaxf((x / copysignf(fmaxf(fabsf((x + 0.745653f)), 1.0e-4f), (x + 0.745653f))), -1.0e4f), 1.0e4f)) - (powf(x, 2.0f) * fmaxf(x, 0.692832f)))) + 0.000009f);\n}",
754
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((1.192774 * ((2 * (x / (abs((x + 0.745653)) < 1e-4 ? 1e-4 : (x + 0.745653)))) - ((x * x) * torch.maximum(x, 0.692832)))) + 0.000009)",
755
755
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACnABbgBENUNxypkV8z9EAAAAAAAAAEAgACAARNlBJa5j3Oc/oJlELUMc6+I2Gj+lIABE2UElrmPc5z+gpqNEAAAAAACIw8ClRAAAAAAAiMNApKIgACAAoiAARKfpswOuK+Y/paKhokRI4e6pTNDiPqAL",
756
756
  },
757
757
  fast: {
758
758
  js: "((x) => x)",
759
759
  eval: ((x) => x),
760
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return x;\n}",
761
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return x",
760
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return x;\n}",
761
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return x",
762
762
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACgYBBAAgAAs=",
763
763
  },
764
764
  meta: {
@@ -775,15 +775,15 @@ const kernels = {
775
775
  precise: {
776
776
  js: "((x) => ((-1.9883720211312108 * ((x) * (x) * (x + -1.503545))) + 0.0005544574268407132))",
777
777
  eval: ((x) => ((-1.9883720211312108 * ((x) * (x) * (x + -1.503545))) + 0.0005544574268407132)),
778
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-1.988372f * (powf(x, 2.0f) * (x + -1.503545f))) + 0.000554f);\n}",
779
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-1.988372 * ((x * x) * (x + -1.503545))) + 0.000554)",
778
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-1.988372f * (powf(x, 2.0f) * (x + -1.503545f))) + 0.000554f);\n}",
779
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-1.988372 * ((x * x) * (x + -1.503545))) + 0.000554)",
780
780
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACioBKABEuaMwLl/Q/78gACAAoiAARHQHsTOFDvi/oKKiRB+F9UEgK0I/oAs=",
781
781
  },
782
782
  fast: {
783
783
  js: "((x) => ((x) * (x) * (x + -1.503545)))",
784
784
  eval: ((x) => ((x) * (x) * (x + -1.503545))),
785
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (powf(x, 2.0f) * (x + -1.503545f));\n}",
786
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((x * x) * (x + -1.503545))",
785
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (powf(x, 2.0f) * (x + -1.503545f));\n}",
786
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((x * x) * (x + -1.503545))",
787
787
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAAChYBFAAgACAAoiAARHQHsTOFDvi/oKIL",
788
788
  },
789
789
  meta: {
@@ -800,15 +800,15 @@ const kernels = {
800
800
  precise: {
801
801
  js: "((x) => ((0.3307987373817299 * (Math.sqrt(Math.abs(Math.sqrt(Math.abs(Math.sin(x))))) + ((1.41372 * Math.sqrt(Math.abs(x))) + (0.881576 * Math.sqrt(Math.abs(x)))))) + -0.07678952774168579))",
802
802
  eval: ((x) => ((0.3307987373817299 * (Math.sqrt(Math.abs(Math.sqrt(Math.abs(Math.sin(x))))) + ((1.41372 * Math.sqrt(Math.abs(x))) + (0.881576 * Math.sqrt(Math.abs(x)))))) + -0.07678952774168579)),
803
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.330799f * (sqrtf(fabsf(sqrtf(fabsf(sinf(x))))) + ((1.41372f * sqrtf(fabsf(x))) + (0.881576f * sqrtf(fabsf(x)))))) + -0.07679f);\n}",
804
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.330799 * (torch.sqrt(torch.abs(torch.sqrt(torch.abs(torch.sin(x))))) + ((1.41372 * torch.sqrt(torch.abs(x))) + (0.881576 * torch.sqrt(torch.abs(x)))))) + -0.07679)",
803
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.330799f * (sqrtf(fabsf(sqrtf(fabsf(sinf(x))))) + ((1.41372f * sqrtf(fabsf(x))) + (0.881576f * sqrtf(fabsf(x)))))) + -0.07679f);\n}",
804
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.330799 * (torch.sqrt(torch.abs(torch.sqrt(torch.abs(torch.sin(x))))) + ((1.41372 * torch.sqrt(torch.abs(x))) + (0.881576 * torch.sqrt(torch.abs(x)))))) + -0.07679)",
805
805
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNzaW4AAQMCAQAHCQEFc3BlYXIAAQo+ATwARDU1p3fOK9U/IAAQAJmfmZ9Eyjfb3Jie9j8gAJmfokQpCB7f3jXsPyAAmZ+ioKCiREhpU356qLO/oAs=",
806
806
  },
807
807
  fast: {
808
808
  js: "((x) => Math.sqrt(Math.abs(x)))",
809
809
  eval: ((x) => Math.sqrt(Math.abs(x))),
810
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return sqrtf(fabsf(x));\n}",
811
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.sqrt(torch.abs(x))",
810
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return sqrtf(fabsf(x));\n}",
811
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.sqrt(torch.abs(x))",
812
812
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACggBBgAgAJmfCw==",
813
813
  },
814
814
  meta: {
@@ -825,15 +825,15 @@ const kernels = {
825
825
  precise: {
826
826
  js: "((x) => (0.900021 * Math.min(1e4, Math.max(-1e4, ((x + (0.053639 * (x) * (x) * (x)))) / (((0.90122 + (0.343141 * (x) * (x)))) < 1e-4 && ((0.90122 + (0.343141 * (x) * (x)))) > -1e-4 ? (((0.90122 + (0.343141 * (x) * (x)))) >= 0 ? 1e-4 : -1e-4) : ((0.90122 + (0.343141 * (x) * (x)))))))))",
827
827
  eval: ((x) => (0.900021 * Math.min(1e4, Math.max(-1e4, ((x + (0.053639 * (x) * (x) * (x)))) / (((0.90122 + (0.343141 * (x) * (x)))) < 1e-4 && ((0.90122 + (0.343141 * (x) * (x)))) > -1e-4 ? (((0.90122 + (0.343141 * (x) * (x)))) >= 0 ? 1e-4 : -1e-4) : ((0.90122 + (0.343141 * (x) * (x))))))))),
828
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (0.900021f * fminf(fmaxf(((x + (0.053639f * powf(x, 3.0f))) / copysignf(fmaxf(fabsf((0.90122f + (0.343141f * powf(x, 2.0f)))), 1.0e-4f), (0.90122f + (0.343141f * powf(x, 2.0f))))), -1.0e4f), 1.0e4f));\n}",
829
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (0.900021 * ((x + (0.053639 * (x ** 3))) / (abs((0.90122 + (0.343141 * (x * x)))) < 1e-4 ? 1e-4 : (0.90122 + (0.343141 * (x * x))))))",
828
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (0.900021f * fminf(fmaxf(((x + (0.053639f * powf(x, 3.0f))) / copysignf(fmaxf(fabsf((0.90122f + (0.343141f * powf(x, 2.0f)))), 1.0e-4f), (0.90122f + (0.343141f * powf(x, 2.0f))))), -1.0e4f), 1.0e4f));\n}",
829
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (0.900021 * ((x + (0.053639 * (x ** 3))) / (abs((0.90122 + (0.343141 * (x * x)))) < 1e-4 ? 1e-4 : (0.90122 + (0.343141 * (x * x))))))",
830
830
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACnYBdABEqtIW1/jM7D8gAETBjZQtknarPyAAIAAgAKKioqBELQlQU8vW7D9Ezas6qwX21T8gACAAoqKgmUQtQxzr4jYaP6VELQlQU8vW7D9Ezas6qwX21T8gACAAoqKgpqNEAAAAAACIw8ClRAAAAAAAiMNApKIL",
831
831
  },
832
832
  fast: {
833
833
  js: "((x) => Math.min(1e4, Math.max(-1e4, (x) / (((2.598194 * (4.397731 + (x) * (x)))) < 1e-4 && ((2.598194 * (4.397731 + (x) * (x)))) > -1e-4 ? (((2.598194 * (4.397731 + (x) * (x)))) >= 0 ? 1e-4 : -1e-4) : ((2.598194 * (4.397731 + (x) * (x))))))))",
834
834
  eval: ((x) => Math.min(1e4, Math.max(-1e4, (x) / (((2.598194 * (4.397731 + (x) * (x)))) < 1e-4 && ((2.598194 * (4.397731 + (x) * (x)))) > -1e-4 ? (((2.598194 * (4.397731 + (x) * (x)))) >= 0 ? 1e-4 : -1e-4) : ((2.598194 * (4.397731 + (x) * (x)))))))),
835
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((x / copysignf(fmaxf(fabsf((2.598194f * (4.397731f + powf(x, 2.0f)))), 1.0e-4f), (2.598194f * (4.397731f + powf(x, 2.0f))))), -1.0e4f), 1.0e4f);\n}",
836
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (x / (abs((2.598194 * (4.397731 + (x * x)))) < 1e-4 ? 1e-4 : (2.598194 * (4.397731 + (x * x)))))",
835
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((x / copysignf(fmaxf(fabsf((2.598194f * (4.397731f + powf(x, 2.0f)))), 1.0e-4f), (2.598194f * (4.397731f + powf(x, 2.0f))))), -1.0e4f), 1.0e4f);\n}",
836
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (x / (abs((2.598194 * (4.397731 + (x * x)))) < 1e-4 ? 1e-4 : (2.598194 * (4.397731 + (x * x)))))",
837
837
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAAClkBVwAgAESxTpXvGckEQEToa5bLRpcRQCAAIACioKKZRC1DHOviNho/pUSxTpXvGckEQEToa5bLRpcRQCAAIACioKKmo0QAAAAAAIjDwKVEAAAAAACIw0CkCw==",
838
838
  },
839
839
  meta: {
@@ -850,15 +850,15 @@ const kernels = {
850
850
  precise: {
851
851
  js: "((x) => Math.atan(x))",
852
852
  eval: ((x) => Math.atan(x)),
853
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return atanf(x);\n}",
854
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.atan(x)",
853
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return atanf(x);\n}",
854
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.atan(x)",
855
855
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgwBA2VudgRhdGFuAAEDAgEABwkBBXNwZWFyAAEKCAEGACAAEAAL",
856
856
  },
857
857
  fast: {
858
858
  js: "((x) => x)",
859
859
  eval: ((x) => x),
860
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return x;\n}",
861
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return x",
860
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return x;\n}",
861
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return x",
862
862
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACgYBBAAgAAs=",
863
863
  },
864
864
  meta: {
@@ -875,15 +875,15 @@ const kernels = {
875
875
  precise: {
876
876
  js: "((x) => ((-0.19481295478887214 * Math.min(x, ((x) * (x) * (-5.123166 - Math.log(Math.max(1e-30, x)))))) + 0.0014582970819922636))",
877
877
  eval: ((x) => ((-0.19481295478887214 * Math.min(x, ((x) * (x) * (-5.123166 - Math.log(Math.max(1e-30, x)))))) + 0.0014582970819922636)),
878
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.194813f * fminf(x, (powf(x, 2.0f) * (-5.123166f - logf(fmaxf(1.0e-30f, x)))))) + 0.001458f);\n}",
879
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-0.194813 * torch.minimum(x, ((x * x) * (-5.123166 - torch.log(torch.clamp(x, min=1e-30)))))) + 0.001458)",
878
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.194813f * fminf(x, (powf(x, 2.0f) * (-5.123166f - logf(fmaxf(1.0e-30f, x)))))) + 0.001458f);\n}",
879
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-0.194813 * torch.minimum(x, ((x * x) * (-5.123166 - torch.log(torch.clamp(x, min=1e-30)))))) + 0.001458)",
880
880
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNsb2cAAQMCAQAHCQEFc3BlYXIAAQo5ATcARO/h04Kh78i/IAAgACAAokSj6lc6H34UwCAARKDC6/5LSLQ5pRAAoaKkokRcv5mRiuRXP6AL",
881
881
  },
882
882
  fast: {
883
883
  js: "((x) => (x) * (x))",
884
884
  eval: ((x) => (x) * (x)),
885
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf(x, 2.0f);\n}",
886
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (x * x)",
885
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf(x, 2.0f);\n}",
886
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (x * x)",
887
887
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACgkBBwAgACAAogs=",
888
888
  },
889
889
  meta: {
@@ -900,8 +900,8 @@ const kernels = {
900
900
  precise: {
901
901
  js: "((x) => (1.106774 * Math.min(1e4, Math.max(-1e4, ((x + (0.034298 * (x) * (x) * (x)))) / (((0.995 + (0.378089 * (x) * (x)))) < 1e-4 && ((0.995 + (0.378089 * (x) * (x)))) > -1e-4 ? (((0.995 + (0.378089 * (x) * (x)))) >= 0 ? 1e-4 : -1e-4) : ((0.995 + (0.378089 * (x) * (x)))))))))",
902
902
  eval: ((x) => (1.106774 * Math.min(1e4, Math.max(-1e4, ((x + (0.034298 * (x) * (x) * (x)))) / (((0.995 + (0.378089 * (x) * (x)))) < 1e-4 && ((0.995 + (0.378089 * (x) * (x)))) > -1e-4 ? (((0.995 + (0.378089 * (x) * (x)))) >= 0 ? 1e-4 : -1e-4) : ((0.995 + (0.378089 * (x) * (x))))))))),
903
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (1.106774f * fminf(fmaxf(((x + (0.034298f * powf(x, 3.0f))) / copysignf(fmaxf(fabsf((0.995f + (0.378089f * powf(x, 2.0f)))), 1.0e-4f), (0.995f + (0.378089f * powf(x, 2.0f))))), -1.0e4f), 1.0e4f));\n}",
904
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (1.106774 * ((x + (0.034298 * (x ** 3))) / (abs((0.995 + (0.378089 * (x * x)))) < 1e-4 ? 1e-4 : (0.995 + (0.378089 * (x * x))))))",
903
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (1.106774f * fminf(fmaxf(((x + (0.034298f * powf(x, 3.0f))) / copysignf(fmaxf(fabsf((0.995f + (0.378089f * powf(x, 2.0f)))), 1.0e-4f), (0.995f + (0.378089f * powf(x, 2.0f))))), -1.0e4f), 1.0e4f));\n}",
904
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (1.106774 * ((x + (0.034298 * (x ** 3))) / (abs((0.995 + (0.378089 * (x * x)))) < 1e-4 ? 1e-4 : (0.995 + (0.378089 * (x * x))))))",
905
905
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACnYBdABEeQJhp1i18T8gAEQp7KLogY+hPyAAIAAgAKKioqBE16NwPQrX7z9Ezox+NJwy2D8gACAAoqKgmUQtQxzr4jYaP6VE16NwPQrX7z9Ezox+NJwy2D8gACAAoqKgpqNEAAAAAACIw8ClRAAAAAAAiMNApKIL",
906
906
  },
907
907
  meta: {
@@ -918,15 +918,15 @@ const kernels = {
918
918
  precise: {
919
919
  js: "((x) => ((-1.0027201115421236 * Math.min(1e4, Math.max(-1e4, ((1.127009 - ((x) * (x) - -0.157558))) / (((Math.max(1.00063274867547, Math.abs(x)) + 0.998628)) < 1e-4 && ((Math.max(1.00063274867547, Math.abs(x)) + 0.998628)) > -1e-4 ? (((Math.max(1.00063274867547, Math.abs(x)) + 0.998628)) >= 0 ? 1e-4 : -1e-4) : ((Math.max(1.00063274867547, Math.abs(x)) + 0.998628)))))) + 0.4859425929345538))",
920
920
  eval: ((x) => ((-1.0027201115421236 * Math.min(1e4, Math.max(-1e4, ((1.127009 - ((x) * (x) - -0.157558))) / (((Math.max(1.00063274867547, Math.abs(x)) + 0.998628)) < 1e-4 && ((Math.max(1.00063274867547, Math.abs(x)) + 0.998628)) > -1e-4 ? (((Math.max(1.00063274867547, Math.abs(x)) + 0.998628)) >= 0 ? 1e-4 : -1e-4) : ((Math.max(1.00063274867547, Math.abs(x)) + 0.998628)))))) + 0.4859425929345538)),
921
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-1.00272f * fminf(fmaxf(((1.127009f - (powf(x, 2.0f) - -0.157558f)) / copysignf(fmaxf(fabsf((fmaxf(1.000633f, fabsf(x)) + 0.998628f)), 1.0e-4f), (fmaxf(1.000633f, fabsf(x)) + 0.998628f))), -1.0e4f), 1.0e4f)) + 0.485943f);\n}",
922
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-1.00272 * ((1.127009 - ((x * x) - -0.157558)) / (abs((torch.maximum(1.000633, torch.abs(x)) + 0.998628)) < 1e-4 ? 1e-4 : (torch.maximum(1.000633, torch.abs(x)) + 0.998628)))) + 0.485943)",
921
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-1.00272f * fminf(fmaxf(((1.127009f - (powf(x, 2.0f) - -0.157558f)) / copysignf(fmaxf(fabsf((fmaxf(1.000633f, fabsf(x)) + 0.998628f)), 1.0e-4f), (fmaxf(1.000633f, fabsf(x)) + 0.998628f))), -1.0e4f), 1.0e4f)) + 0.485943f);\n}",
922
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-1.00272 * ((1.127009 - ((x * x) - -0.157558)) / (abs((torch.maximum(1.000633, torch.abs(x)) + 0.998628)) < 1e-4 ? 1e-4 : (torch.maximum(1.000633, torch.abs(x)) + 0.998628)))) + 0.485943)",
923
923
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACoABAX4ARJrWYT4kC/C/RDvD1JY6CPI/IAAgAKJExZCcTNwqxL+hoUQ64i18lwLwPyAAmaVEH9YbtcL07z+gmUQtQxzr4jYaP6VEOuItfJcC8D8gAJmlRB/WG7XC9O8/oKajRAAAAAAAiMPApUQAAAAAAIjDQKSiRFTKGPauGd8/oAs=",
924
924
  },
925
925
  fast: {
926
926
  js: "((x) => Math.min(1e4, Math.max(-1e4, ((x) * (x)) / (((Math.abs(x) + 0.989)) < 1e-4 && ((Math.abs(x) + 0.989)) > -1e-4 ? (((Math.abs(x) + 0.989)) >= 0 ? 1e-4 : -1e-4) : ((Math.abs(x) + 0.989))))))",
927
927
  eval: ((x) => Math.min(1e4, Math.max(-1e4, ((x) * (x)) / (((Math.abs(x) + 0.989)) < 1e-4 && ((Math.abs(x) + 0.989)) > -1e-4 ? (((Math.abs(x) + 0.989)) >= 0 ? 1e-4 : -1e-4) : ((Math.abs(x) + 0.989)))))),
928
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((powf(x, 2.0f) / copysignf(fmaxf(fabsf((fabsf(x) + 0.989f)), 1.0e-4f), (fabsf(x) + 0.989f))), -1.0e4f), 1.0e4f);\n}",
929
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((x * x) / (abs((torch.abs(x) + 0.989)) < 1e-4 ? 1e-4 : (torch.abs(x) + 0.989)))",
928
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((powf(x, 2.0f) / copysignf(fmaxf(fabsf((fabsf(x) + 0.989f)), 1.0e-4f), (fabsf(x) + 0.989f))), -1.0e4f), 1.0e4f);\n}",
929
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((x * x) / (abs((torch.abs(x) + 0.989)) < 1e-4 ? 1e-4 : (torch.abs(x) + 0.989)))",
930
930
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACkQBQgAgACAAoiAAmUTZzvdT46XvP6CZRC1DHOviNho/pSAAmUTZzvdT46XvP6Cmo0QAAAAAAIjDwKVEAAAAAACIw0CkCw==",
931
931
  },
932
932
  meta: {
@@ -943,15 +943,15 @@ const kernels = {
943
943
  precise: {
944
944
  js: "((x) => ((0.0012556691840234057 * ((Math.sqrt(Math.abs((x) * (x))) * Math.cos((x) * (x))) + (((x) * (x) + 11.494621)) * (((x) * (x) + 11.494621)) * (((x) * (x) + 11.494621)))) + -0.9070393177602898))",
945
945
  eval: ((x) => ((0.0012556691840234057 * ((Math.sqrt(Math.abs((x) * (x))) * Math.cos((x) * (x))) + (((x) * (x) + 11.494621)) * (((x) * (x) + 11.494621)) * (((x) * (x) + 11.494621)))) + -0.9070393177602898)),
946
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.001256f * ((sqrtf(fabsf(powf(x, 2.0f))) * cosf(powf(x, 2.0f))) + powf((powf(x, 2.0f) + 11.494621f), 3.0f))) + -0.907039f);\n}",
947
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.001256 * ((torch.sqrt(torch.abs((x * x))) * torch.cos((x * x))) + (((x * x) + 11.494621) ** 3))) + -0.907039)",
946
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.001256f * ((sqrtf(fabsf(powf(x, 2.0f))) * cosf(powf(x, 2.0f))) + powf((powf(x, 2.0f) + 11.494621f), 3.0f))) + -0.907039f);\n}",
947
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.001256 * ((torch.sqrt(torch.abs((x * x))) * torch.cos((x * x))) + (((x * x) + 11.494621) ** 3))) + -0.907039)",
948
948
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNjb3MAAQMCAQAHCQEFc3BlYXIAAQpXAVUARLNRHoWoklQ/IAAgAKKZnyAAIACiEACiIAAgAKJEY9S19j79JkCgIAAgAKJEY9S19j79JkCgIAAgAKJEY9S19j79JkCgoqKgokRc7r5Rdwbtv6AL",
949
949
  },
950
950
  fast: {
951
951
  js: "((x) => (((x) * (x) + 5.05555)) * (((x) * (x) + 5.05555)))",
952
952
  eval: ((x) => (((x) * (x) + 5.05555)) * (((x) * (x) + 5.05555))),
953
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf((powf(x, 2.0f) + 5.05555f), 2.0f);\n}",
954
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (((x * x) + 5.05555) * ((x * x) + 5.05555))",
953
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf((powf(x, 2.0f) + 5.05555f), 2.0f);\n}",
954
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (((x * x) + 5.05555) * ((x * x) + 5.05555))",
955
955
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACiMBIQAgACAAokTUK2UZ4jgUQKAgACAAokTUK2UZ4jgUQKCiCw==",
956
956
  },
957
957
  meta: {
@@ -968,15 +968,15 @@ const kernels = {
968
968
  precise: {
969
969
  js: "((x) => ((-0.6162005993906633 * Math.min(1e4, Math.max(-1e4, (((3.154708 + Math.min(3.154708, x)) + (Math.min(3.396868, x) * Math.min(2.050039, x)))) / ((Math.max(4.359564, x)) < 1e-4 && (Math.max(4.359564, x)) > -1e-4 ? ((Math.max(4.359564, x)) >= 0 ? 1e-4 : -1e-4) : (Math.max(4.359564, x)))))) + 1.48653822658716))",
970
970
  eval: ((x) => ((-0.6162005993906633 * Math.min(1e4, Math.max(-1e4, (((3.154708 + Math.min(3.154708, x)) + (Math.min(3.396868, x) * Math.min(2.050039, x)))) / ((Math.max(4.359564, x)) < 1e-4 && (Math.max(4.359564, x)) > -1e-4 ? ((Math.max(4.359564, x)) >= 0 ? 1e-4 : -1e-4) : (Math.max(4.359564, x)))))) + 1.48653822658716)),
971
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.616201f * fminf(fmaxf((((3.154708f + fminf(3.154708f, x)) + (fminf(3.396868f, x) * fminf(2.050039f, x))) / copysignf(fmaxf(fabsf(fmaxf(4.359564f, x)), 1.0e-4f), fmaxf(4.359564f, x))), -1.0e4f), 1.0e4f)) + 1.486538f);\n}",
972
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-0.616201 * (((3.154708 + torch.minimum(3.154708, x)) + (torch.minimum(3.396868, x) * torch.minimum(2.050039, x))) / (abs(torch.maximum(4.359564, x)) < 1e-4 ? 1e-4 : torch.maximum(4.359564, x)))) + 1.486538)",
971
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.616201f * fminf(fmaxf((((3.154708f + fminf(3.154708f, x)) + (fminf(3.396868f, x) * fminf(2.050039f, x))) / copysignf(fmaxf(fabsf(fmaxf(4.359564f, x)), 1.0e-4f), fmaxf(4.359564f, x))), -1.0e4f), 1.0e4f)) + 1.486538f);\n}",
972
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-0.616201 * (((3.154708 + torch.minimum(3.154708, x)) + (torch.minimum(3.396868, x) * torch.minimum(2.050039, x))) / (abs(torch.maximum(4.359564, x)) < 1e-4 ? 1e-4 : torch.maximum(4.359564, x)))) + 1.486538)",
973
973
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACoEBAX8ARGcSxVHqt+O/RMFvQ4zXPAlARMFvQ4zXPAlAIACkoESloUYhySwLQCAApEREMuTYemYAQCAApKKgRJlGk4sxcBFAIAClmUQtQxzr4jYaP6VEmUaTizFwEUAgAKWmo0QAAAAAAIjDwKVEAAAAAACIw0CkokSMIbdO3Mj3P6AL",
974
974
  },
975
975
  fast: {
976
976
  js: "((x) => Math.min(1e4, Math.max(-1e4, (((2.899151 + Math.min(3.154708, x)) + (Math.min(3.396868, x) * Math.min(2.061274, x)))) / ((Math.max(4.359564, x)) < 1e-4 && (Math.max(4.359564, x)) > -1e-4 ? ((Math.max(4.359564, x)) >= 0 ? 1e-4 : -1e-4) : (Math.max(4.359564, x))))))",
977
977
  eval: ((x) => Math.min(1e4, Math.max(-1e4, (((2.899151 + Math.min(3.154708, x)) + (Math.min(3.396868, x) * Math.min(2.061274, x)))) / ((Math.max(4.359564, x)) < 1e-4 && (Math.max(4.359564, x)) > -1e-4 ? ((Math.max(4.359564, x)) >= 0 ? 1e-4 : -1e-4) : (Math.max(4.359564, x)))))),
978
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((((2.899151f + fminf(3.154708f, x)) + (fminf(3.396868f, x) * fminf(2.061274f, x))) / copysignf(fmaxf(fabsf(fmaxf(4.359564f, x)), 1.0e-4f), fmaxf(4.359564f, x))), -1.0e4f), 1.0e4f);\n}",
979
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (((2.899151 + torch.minimum(3.154708, x)) + (torch.minimum(3.396868, x) * torch.minimum(2.061274, x))) / (abs(torch.maximum(4.359564, x)) < 1e-4 ? 1e-4 : torch.maximum(4.359564, x)))",
978
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((((2.899151f + fminf(3.154708f, x)) + (fminf(3.396868f, x) * fminf(2.061274f, x))) / copysignf(fmaxf(fabsf(fmaxf(4.359564f, x)), 1.0e-4f), fmaxf(4.359564f, x))), -1.0e4f), 1.0e4f);\n}",
979
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (((2.899151 + torch.minimum(3.154708, x)) + (torch.minimum(3.396868, x) * torch.minimum(2.061274, x))) / (abs(torch.maximum(4.359564, x)) < 1e-4 ? 1e-4 : torch.maximum(4.359564, x)))",
980
980
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACm0BawBEWFNZFHYxB0BEwW9DjNc8CUAgAKSgRKWhRiHJLAtAIACkRMbCEDl9fQBAIACkoqBEmUaTizFwEUAgAKWZRC1DHOviNho/pUSZRpOLMXARQCAApaajRAAAAAAAiMPApUQAAAAAAIjDQKQL",
981
981
  },
982
982
  meta: {
@@ -993,15 +993,15 @@ const kernels = {
993
993
  precise: {
994
994
  js: "((x) => ((0.467801 * Math.min(Math.min((x + -0.251268), Math.sin((x * 0.889558))), Math.sin(((x * 0.90724) + -0.170621)))) + 0.123708))",
995
995
  eval: ((x) => ((0.467801 * Math.min(Math.min((x + -0.251268), Math.sin((x * 0.889558))), Math.sin(((x * 0.90724) + -0.170621)))) + 0.123708)),
996
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.467801f * fminf(fminf((x + -0.251268f), sinf((x * 0.889558f))), sinf(((x * 0.90724f) + -0.170621f)))) + 0.123708f);\n}",
997
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.467801 * torch.minimum(torch.minimum((x + -0.251268), torch.sin((x * 0.889558))), torch.sin(((x * 0.90724) + -0.170621)))) + 0.123708)",
996
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.467801f * fminf(fminf((x + -0.251268f), sinf((x * 0.889558f))), sinf(((x * 0.90724f) + -0.170621f)))) + 0.123708f);\n}",
997
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.467801 * torch.minimum(torch.minimum((x + -0.251268), torch.sin((x * 0.889558))), torch.sin(((x * 0.90724) + -0.170621)))) + 0.123708)",
998
998
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNzaW4AAQMCAQAHCQEFc3BlYXIAAQpMAUoARGZPAptz8N0/IABERwGiYMYU0L+gIABEN6W8VkJ37D+iEACkIABE8u8zLhwI7T+iRGtiga/o1sW/oBAApKJE1elA1lOrvz+gCw==",
999
999
  },
1000
1000
  fast: {
1001
1001
  js: "((x) => Math.min(Math.min(2.051452, (x + -0.339138)), Math.min(0.889558, Math.sin((x * 0.889558)))))",
1002
1002
  eval: ((x) => Math.min(Math.min(2.051452, (x + -0.339138)), Math.min(0.889558, Math.sin((x * 0.889558))))),
1003
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fminf(2.051452f, (x + -0.339138f)), fminf(0.889558f, sinf((x * 0.889558f))));\n}",
1004
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.minimum(torch.minimum(2.051452, (x + -0.339138)), torch.minimum(0.889558, torch.sin((x * 0.889558))))",
1003
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fminf(2.051452f, (x + -0.339138f)), fminf(0.889558f, sinf((x * 0.889558f))));\n}",
1004
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.minimum(torch.minimum(2.051452, (x + -0.339138)), torch.minimum(0.889558, torch.sin((x * 0.889558))))",
1005
1005
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNzaW4AAQMCAQAHCQEFc3BlYXIAAQozATEARKWCiqpfaQBAIABEnSy13m+01b+gpEQ3pbxWQnfsPyAARDelvFZCd+w/ohAApKQL",
1006
1006
  },
1007
1007
  meta: {
@@ -1018,15 +1018,15 @@ const kernels = {
1018
1018
  precise: {
1019
1019
  js: "((x) => ((12961264.054148097 * Math.min(1e4, Math.max(-1e4, (Math.min(1e4, Math.max(-1e4, (6608.647704) / ((Math.max(x, 6608.647704)) < 1e-4 && (Math.max(x, 6608.647704)) > -1e-4 ? ((Math.max(x, 6608.647704)) >= 0 ? 1e-4 : -1e-4) : (Math.max(x, 6608.647704)))))) / (((Math.max(Math.max(x, 6608.647704), 6449.745424)) * (Math.max(Math.max(x, 6608.647704), 6449.745424))) < 1e-4 && ((Math.max(Math.max(x, 6608.647704), 6449.745424)) * (Math.max(Math.max(x, 6608.647704), 6449.745424))) > -1e-4 ? (((Math.max(Math.max(x, 6608.647704), 6449.745424)) * (Math.max(Math.max(x, 6608.647704), 6449.745424))) >= 0 ? 1e-4 : -1e-4) : ((Math.max(Math.max(x, 6608.647704), 6449.745424)) * (Math.max(Math.max(x, 6608.647704), 6449.745424))))))) + 0.7030813139014296))",
1020
1020
  eval: ((x) => ((12961264.054148097 * Math.min(1e4, Math.max(-1e4, (Math.min(1e4, Math.max(-1e4, (6608.647704) / ((Math.max(x, 6608.647704)) < 1e-4 && (Math.max(x, 6608.647704)) > -1e-4 ? ((Math.max(x, 6608.647704)) >= 0 ? 1e-4 : -1e-4) : (Math.max(x, 6608.647704)))))) / (((Math.max(Math.max(x, 6608.647704), 6449.745424)) * (Math.max(Math.max(x, 6608.647704), 6449.745424))) < 1e-4 && ((Math.max(Math.max(x, 6608.647704), 6449.745424)) * (Math.max(Math.max(x, 6608.647704), 6449.745424))) > -1e-4 ? (((Math.max(Math.max(x, 6608.647704), 6449.745424)) * (Math.max(Math.max(x, 6608.647704), 6449.745424))) >= 0 ? 1e-4 : -1e-4) : ((Math.max(Math.max(x, 6608.647704), 6449.745424)) * (Math.max(Math.max(x, 6608.647704), 6449.745424))))))) + 0.7030813139014296)),
1021
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((12961264.054148f * fminf(fmaxf((fminf(fmaxf((6608.647704f / copysignf(fmaxf(fabsf(fmaxf(x, 6608.647704f)), 1.0e-4f), fmaxf(x, 6608.647704f))), -1.0e4f), 1.0e4f) / copysignf(fmaxf(fabsf(powf(fmaxf(fmaxf(x, 6608.647704f), 6449.745424f), 2.0f)), 1.0e-4f), powf(fmaxf(fmaxf(x, 6608.647704f), 6449.745424f), 2.0f))), -1.0e4f), 1.0e4f)) + 0.703081f);\n}",
1022
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((12961264.054148 * ((6608.647704 / (abs(torch.maximum(x, 6608.647704)) < 1e-4 ? 1e-4 : torch.maximum(x, 6608.647704))) / (abs((torch.maximum(torch.maximum(x, 6608.647704), 6449.745424) * torch.maximum(torch.maximum(x, 6608.647704), 6449.745424))) < 1e-4 ? 1e-4 : (torch.maximum(torch.maximum(x, 6608.647704), 6449.745424) * torch.maximum(torch.maximum(x, 6608.647704), 6449.745424))))) + 0.703081)",
1021
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((12961264.054148f * fminf(fmaxf((fminf(fmaxf((6608.647704f / copysignf(fmaxf(fabsf(fmaxf(x, 6608.647704f)), 1.0e-4f), fmaxf(x, 6608.647704f))), -1.0e4f), 1.0e4f) / copysignf(fmaxf(fabsf(powf(fmaxf(fmaxf(x, 6608.647704f), 6449.745424f), 2.0f)), 1.0e-4f), powf(fmaxf(fmaxf(x, 6608.647704f), 6449.745424f), 2.0f))), -1.0e4f), 1.0e4f)) + 0.703081f);\n}",
1022
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((12961264.054148 * ((6608.647704 / (abs(torch.maximum(x, 6608.647704)) < 1e-4 ? 1e-4 : torch.maximum(x, 6608.647704))) / (abs((torch.maximum(torch.maximum(x, 6608.647704), 6449.745424) * torch.maximum(torch.maximum(x, 6608.647704), 6449.745424))) < 1e-4 ? 1e-4 : (torch.maximum(torch.maximum(x, 6608.647704), 6449.745424) * torch.maximum(torch.maximum(x, 6608.647704), 6449.745424))))) + 0.703081)",
1023
1023
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACtYBAdMBAETKlLsBvrhoQUR96e3PpdC5QCAARH3p7c+l0LlApZlELUMc6+I2Gj+lIABEfentz6XQuUClpqNEAAAAAACIw8ClRAAAAAAAiMNApCAARH3p7c+l0LlApUSndRvUvjG5QKUgAER96e3PpdC5QKVEp3Ub1L4xuUCloplELUMc6+I2Gj+lIABEfentz6XQuUClRKd1G9S+MblApSAARH3p7c+l0LlApUSndRvUvjG5QKWipqNEAAAAAACIw8ClRAAAAAAAiMNApKJEylQ0YqR/5j+gCw==",
1024
1024
  },
1025
1025
  fast: {
1026
1026
  js: "((x) => Math.max(x, 5157.260551))",
1027
1027
  eval: ((x) => Math.max(x, 5157.260551)),
1028
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fmaxf(x, 5157.260551f);\n}",
1029
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.maximum(x, 5157.260551)",
1028
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fmaxf(x, 5157.260551f);\n}",
1029
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.maximum(x, 5157.260551)",
1030
1030
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAAChABDgAgAETxZ3izQiW0QKUL",
1031
1031
  },
1032
1032
  meta: {
@@ -1043,15 +1043,15 @@ const kernels = {
1043
1043
  precise: {
1044
1044
  js: "((x) => ((0.448455 * Math.min(1e4, Math.max(-1e4, (Math.min(1e4, Math.max(-1e4, (-1.053345) / (((0.540086 + x)) < 1e-4 && ((0.540086 + x)) > -1e-4 ? (((0.540086 + x)) >= 0 ? 1e-4 : -1e-4) : ((0.540086 + x)))))) / (((Math.max(0.123065, x) + 0.74133)) < 1e-4 && ((Math.max(0.123065, x) + 0.74133)) > -1e-4 ? (((Math.max(0.123065, x) + 0.74133)) >= 0 ? 1e-4 : -1e-4) : ((Math.max(0.123065, x) + 0.74133)))))) + 0.980331))",
1045
1045
  eval: ((x) => ((0.448455 * Math.min(1e4, Math.max(-1e4, (Math.min(1e4, Math.max(-1e4, (-1.053345) / (((0.540086 + x)) < 1e-4 && ((0.540086 + x)) > -1e-4 ? (((0.540086 + x)) >= 0 ? 1e-4 : -1e-4) : ((0.540086 + x)))))) / (((Math.max(0.123065, x) + 0.74133)) < 1e-4 && ((Math.max(0.123065, x) + 0.74133)) > -1e-4 ? (((Math.max(0.123065, x) + 0.74133)) >= 0 ? 1e-4 : -1e-4) : ((Math.max(0.123065, x) + 0.74133)))))) + 0.980331)),
1046
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.448455f * fminf(fmaxf((fminf(fmaxf((-1.053345f / copysignf(fmaxf(fabsf((0.540086f + x)), 1.0e-4f), (0.540086f + x))), -1.0e4f), 1.0e4f) / copysignf(fmaxf(fabsf((fmaxf(0.123065f, x) + 0.74133f)), 1.0e-4f), (fmaxf(0.123065f, x) + 0.74133f))), -1.0e4f), 1.0e4f)) + 0.980331f);\n}",
1047
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.448455 * ((-1.053345 / (abs((0.540086 + x)) < 1e-4 ? 1e-4 : (0.540086 + x))) / (abs((torch.maximum(0.123065, x) + 0.74133)) < 1e-4 ? 1e-4 : (torch.maximum(0.123065, x) + 0.74133)))) + 0.980331)",
1046
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.448455f * fminf(fmaxf((fminf(fmaxf((-1.053345f / copysignf(fmaxf(fabsf((0.540086f + x)), 1.0e-4f), (0.540086f + x))), -1.0e4f), 1.0e4f) / copysignf(fmaxf(fabsf((fmaxf(0.123065f, x) + 0.74133f)), 1.0e-4f), (fmaxf(0.123065f, x) + 0.74133f))), -1.0e4f), 1.0e4f)) + 0.980331f);\n}",
1047
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.448455 * ((-1.053345 / (abs((0.540086 + x)) < 1e-4 ? 1e-4 : (0.540086 + x))) / (abs((torch.maximum(0.123065, x) + 0.74133)) < 1e-4 ? 1e-4 : (torch.maximum(0.123065, x) + 0.74133)))) + 0.980331)",
1048
1048
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACqgBAaUBAERPkq6ZfLPcP0Rfe2ZJgNrwv0Tr4GBvYkjhPyAAoJlELUMc6+I2Gj+lROvgYG9iSOE/IACgpqNEAAAAAACIw8ClRAAAAAAAiMNApEThQEgWMIG/PyAApUTUZTGx+bjnP6CZRC1DHOviNho/pUThQEgWMIG/PyAApUTUZTGx+bjnP6Cmo0QAAAAAAIjDwKVEAAAAAACIw0CkokTDKAge317vP6AL",
1049
1049
  },
1050
1050
  fast: {
1051
1051
  js: "((x) => Math.min(1e4, Math.max(-1e4, (4.095859) / (((x + 0.40901)) < 1e-4 && ((x + 0.40901)) > -1e-4 ? (((x + 0.40901)) >= 0 ? 1e-4 : -1e-4) : ((x + 0.40901))))))",
1052
1052
  eval: ((x) => Math.min(1e4, Math.max(-1e4, (4.095859) / (((x + 0.40901)) < 1e-4 && ((x + 0.40901)) > -1e-4 ? (((x + 0.40901)) >= 0 ? 1e-4 : -1e-4) : ((x + 0.40901)))))),
1053
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((4.095859f / copysignf(fmaxf(fabsf((x + 0.40901f)), 1.0e-4f), (x + 0.40901f))), -1.0e4f), 1.0e4f);\n}",
1054
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (4.095859 / (abs((x + 0.40901)) < 1e-4 ? 1e-4 : (x + 0.40901)))",
1053
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((4.095859f / copysignf(fmaxf(fabsf((x + 0.40901f)), 1.0e-4f), (x + 0.40901f))), -1.0e4f), 1.0e4f);\n}",
1054
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (4.095859 / (abs((x + 0.40901)) < 1e-4 ? 1e-4 : (x + 0.40901)))",
1055
1055
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACkYBRABE6xuY3ChiEEAgAERaKm9HOC3aP6CZRC1DHOviNho/pSAARFoqb0c4Ldo/oKajRAAAAAAAiMPApUQAAAAAAIjDQKQL",
1056
1056
  },
1057
1057
  meta: {
@@ -1068,15 +1068,15 @@ const kernels = {
1068
1068
  precise: {
1069
1069
  js: "((b, a) => ((0.9884453418513615 * Math.max(Math.min(b, a), (Math.max(b, Math.max(a, b)) + -0.863454))) + 0.9463635441197152))",
1070
1070
  eval: ((b, a) => ((0.9884453418513615 * Math.max(Math.min(b, a), (Math.max(b, Math.max(a, b)) + -0.863454))) + 0.9463635441197152)),
1071
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.988445f * fmaxf(fminf(b, a), (fmaxf(b, fmaxf(a, b)) + -0.863454f))) + 0.946364f);\n}",
1072
- py: "import torch\n\ndef spear_fn(b, a):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.988445 * torch.maximum(torch.minimum(b, a), (torch.maximum(b, torch.maximum(a, b)) + -0.863454))) + 0.946364)",
1071
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.988445f * fmaxf(fminf(b, a), (fmaxf(b, fmaxf(a, b)) + -0.863454f))) + 0.946364f);\n}",
1072
+ py: "import torch\n\ndef spear_fn(b, a):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.988445 * torch.maximum(torch.minimum(b, a), (torch.maximum(b, torch.maximum(a, b)) + -0.863454))) + 0.946364)",
1073
1073
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAMCAQAHCQEFc3BlYXIAAAowAS4ARAxTJCBYoe8/IAAgAaQgACABIAClpURZNnNIaqHrv6ClokTX3QMznEjuP6AL",
1074
1074
  },
1075
1075
  fast: {
1076
1076
  js: "((a, b) => Math.max(a, b))",
1077
1077
  eval: ((a, b) => Math.max(a, b)),
1078
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fmaxf(a, b);\n}",
1079
- py: "import torch\n\ndef spear_fn(a, b):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.maximum(a, b)",
1078
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fmaxf(a, b);\n}",
1079
+ py: "import torch\n\ndef spear_fn(a, b):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.maximum(a, b)",
1080
1080
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAMCAQAHCQEFc3BlYXIAAAoJAQcAIAAgAaUL",
1081
1081
  },
1082
1082
  meta: {
@@ -1093,15 +1093,15 @@ const kernels = {
1093
1093
  precise: {
1094
1094
  js: "((x) => ((-4.274877162925097 * (Math.sqrt(Math.abs(Math.sqrt(Math.abs(Math.log(Math.max(1e-30, x)))))) + (0.076417 * (x) * (x)))) + 3.9839485700095683))",
1095
1095
  eval: ((x) => ((-4.274877162925097 * (Math.sqrt(Math.abs(Math.sqrt(Math.abs(Math.log(Math.max(1e-30, x)))))) + (0.076417 * (x) * (x)))) + 3.9839485700095683)),
1096
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-4.274877f * (sqrtf(fabsf(sqrtf(fabsf(logf(fmaxf(1.0e-30f, x)))))) + (0.076417f * powf(x, 2.0f)))) + 3.983949f);\n}",
1097
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-4.274877 * (torch.sqrt(torch.abs(torch.sqrt(torch.abs(torch.log(torch.clamp(x, min=1e-30)))))) + (0.076417 * (x * x)))) + 3.983949)",
1096
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-4.274877f * (sqrtf(fabsf(sqrtf(fabsf(logf(fmaxf(1.0e-30f, x)))))) + (0.076417f * powf(x, 2.0f)))) + 3.983949f);\n}",
1097
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-4.274877 * (torch.sqrt(torch.abs(torch.sqrt(torch.abs(torch.log(torch.clamp(x, min=1e-30)))))) + (0.076417 * (x * x)))) + 3.983949)",
1098
1098
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNsb2cAAQMCAQAHCQEFc3BlYXIAAQo6ATgAROO4JGZ5GRHAIABEoMLr/ktItDmlEACZn5mfRDPC24MQkLM/IAAgAKKioKJEtBiJbSDfD0CgCw==",
1099
1099
  },
1100
1100
  fast: {
1101
1101
  js: "((x) => Math.sqrt(Math.abs(Math.sqrt(Math.abs(Math.log(Math.max(1e-30, x)))))))",
1102
1102
  eval: ((x) => Math.sqrt(Math.abs(Math.sqrt(Math.abs(Math.log(Math.max(1e-30, x))))))),
1103
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return sqrtf(fabsf(sqrtf(fabsf(logf(fmaxf(1.0e-30f, x))))));\n}",
1104
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.sqrt(torch.abs(torch.sqrt(torch.abs(torch.log(torch.clamp(x, min=1e-30))))))",
1103
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return sqrtf(fabsf(sqrtf(fabsf(logf(fmaxf(1.0e-30f, x))))));\n}",
1104
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.sqrt(torch.abs(torch.sqrt(torch.abs(torch.log(torch.clamp(x, min=1e-30))))))",
1105
1105
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNsb2cAAQMCAQAHCQEFc3BlYXIAAQoWARQAIABEoMLr/ktItDmlEACZn5mfCw==",
1106
1106
  },
1107
1107
  meta: {
@@ -1118,15 +1118,15 @@ const kernels = {
1118
1118
  precise: {
1119
1119
  js: "((n, r) => ((-0.6469010959077766 * Math.min(1e4, Math.max(-1e4, (Math.min(1e4, Math.max(-1e4, (n) / (((r + (n * 0.269972))) < 1e-4 && ((r + (n * 0.269972))) > -1e-4 ? (((r + (n * 0.269972))) >= 0 ? 1e-4 : -1e-4) : ((r + (n * 0.269972))))))) / ((((r * 0.810197) - Math.atan(n))) < 1e-4 && (((r * 0.810197) - Math.atan(n))) > -1e-4 ? ((((r * 0.810197) - Math.atan(n))) >= 0 ? 1e-4 : -1e-4) : (((r * 0.810197) - Math.atan(n))))))) + -1.5260749723747622))",
1120
1120
  eval: ((n, r) => ((-0.6469010959077766 * Math.min(1e4, Math.max(-1e4, (Math.min(1e4, Math.max(-1e4, (n) / (((r + (n * 0.269972))) < 1e-4 && ((r + (n * 0.269972))) > -1e-4 ? (((r + (n * 0.269972))) >= 0 ? 1e-4 : -1e-4) : ((r + (n * 0.269972))))))) / ((((r * 0.810197) - Math.atan(n))) < 1e-4 && (((r * 0.810197) - Math.atan(n))) > -1e-4 ? ((((r * 0.810197) - Math.atan(n))) >= 0 ? 1e-4 : -1e-4) : (((r * 0.810197) - Math.atan(n))))))) + -1.5260749723747622)),
1121
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.646901f * fminf(fmaxf((fminf(fmaxf((n / copysignf(fmaxf(fabsf((r + (n * 0.269972f))), 1.0e-4f), (r + (n * 0.269972f)))), -1.0e4f), 1.0e4f) / copysignf(fmaxf(fabsf(((r * 0.810197f) - atanf(n))), 1.0e-4f), ((r * 0.810197f) - atanf(n)))), -1.0e4f), 1.0e4f)) + -1.526075f);\n}",
1122
- py: "import torch\n\ndef spear_fn(n, r):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-0.646901 * ((n / (abs((r + (n * 0.269972))) < 1e-4 ? 1e-4 : (r + (n * 0.269972)))) / (abs(((r * 0.810197) - torch.atan(n))) < 1e-4 ? 1e-4 : ((r * 0.810197) - torch.atan(n))))) + -1.526075)",
1121
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.646901f * fminf(fmaxf((fminf(fmaxf((n / copysignf(fmaxf(fabsf((r + (n * 0.269972f))), 1.0e-4f), (r + (n * 0.269972f)))), -1.0e4f), 1.0e4f) / copysignf(fmaxf(fabsf(((r * 0.810197f) - atanf(n))), 1.0e-4f), ((r * 0.810197f) - atanf(n)))), -1.0e4f), 1.0e4f)) + -1.526075f);\n}",
1122
+ py: "import torch\n\ndef spear_fn(n, r):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-0.646901 * ((n / (abs((r + (n * 0.269972))) < 1e-4 ? 1e-4 : (r + (n * 0.269972)))) / (abs(((r * 0.810197) - torch.atan(n))) < 1e-4 ? 1e-4 : ((r * 0.810197) - torch.atan(n))))) + -1.526075)",
1123
1123
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAIMAQNlbnYEYXRhbgABAwIBAAcJAQVzcGVhcgABCp0BAZoBAERodFXtabPkvyAAIAEgAEROfLWjOEfRP6KgmUQtQxzr4jYaP6UgASAARE58taM4R9E/oqCmo0QAAAAAAIjDwKVEAAAAAACIw0CkIAFEaydKQiLt6T+iIAAQAKGZRC1DHOviNho/pSABRGsnSkIi7ek/oiAAEAChpqNEAAAAAACIw8ClRAAAAAAAiMNApKJE038Zl81q+L+gCw==",
1124
1124
  },
1125
1125
  fast: {
1126
1126
  js: "((r, n) => ((r - Math.atan((n - 2.963402)))) * ((r - Math.atan((n - 2.963402)))) * ((r - Math.atan((n - 2.963402)))))",
1127
1127
  eval: ((r, n) => ((r - Math.atan((n - 2.963402)))) * ((r - Math.atan((n - 2.963402)))) * ((r - Math.atan((n - 2.963402))))),
1128
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf((r - atanf((n - 2.963402f))), 3.0f);\n}",
1129
- py: "import torch\n\ndef spear_fn(r, n):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((r - torch.atan((n - 2.963402))) ** 3)",
1128
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf((r - atanf((n - 2.963402f))), 3.0f);\n}",
1129
+ py: "import torch\n\ndef spear_fn(r, n):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((r - torch.atan((n - 2.963402))) ** 3)",
1130
1130
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAIMAQNlbnYEYXRhbgABAwIBAAcJAQVzcGVhcgABCjkBNwAgACABRDs1lxsMtQdAoRAAoSAAIAFEOzWXGwy1B0ChEAChIAAgAUQ7NZcbDLUHQKEQAKGiogs=",
1131
1131
  },
1132
1132
  meta: {
@@ -1143,15 +1143,15 @@ const kernels = {
1143
1143
  precise: {
1144
1144
  js: "((x) => ((3896.479658 * Math.min(1e4, Math.max(-1e4, ((Math.log(Math.max(1e-30, Math.sqrt(Math.abs(x)))) - 2.971801)) / ((Math.min(1e4, Math.max(-1e4, ((-1.66618 * x)) / ((Math.atan(Math.atan(x))) < 1e-4 && (Math.atan(Math.atan(x))) > -1e-4 ? ((Math.atan(Math.atan(x))) >= 0 ? 1e-4 : -1e-4) : (Math.atan(Math.atan(x))))))) < 1e-4 && (Math.min(1e4, Math.max(-1e4, ((-1.66618 * x)) / ((Math.atan(Math.atan(x))) < 1e-4 && (Math.atan(Math.atan(x))) > -1e-4 ? ((Math.atan(Math.atan(x))) >= 0 ? 1e-4 : -1e-4) : (Math.atan(Math.atan(x))))))) > -1e-4 ? ((Math.min(1e4, Math.max(-1e4, ((-1.66618 * x)) / ((Math.atan(Math.atan(x))) < 1e-4 && (Math.atan(Math.atan(x))) > -1e-4 ? ((Math.atan(Math.atan(x))) >= 0 ? 1e-4 : -1e-4) : (Math.atan(Math.atan(x))))))) >= 0 ? 1e-4 : -1e-4) : (Math.min(1e4, Math.max(-1e4, ((-1.66618 * x)) / ((Math.atan(Math.atan(x))) < 1e-4 && (Math.atan(Math.atan(x))) > -1e-4 ? ((Math.atan(Math.atan(x))) >= 0 ? 1e-4 : -1e-4) : (Math.atan(Math.atan(x))))))))))) + 1.501624))",
1145
1145
  eval: ((x) => ((3896.479658 * Math.min(1e4, Math.max(-1e4, ((Math.log(Math.max(1e-30, Math.sqrt(Math.abs(x)))) - 2.971801)) / ((Math.min(1e4, Math.max(-1e4, ((-1.66618 * x)) / ((Math.atan(Math.atan(x))) < 1e-4 && (Math.atan(Math.atan(x))) > -1e-4 ? ((Math.atan(Math.atan(x))) >= 0 ? 1e-4 : -1e-4) : (Math.atan(Math.atan(x))))))) < 1e-4 && (Math.min(1e4, Math.max(-1e4, ((-1.66618 * x)) / ((Math.atan(Math.atan(x))) < 1e-4 && (Math.atan(Math.atan(x))) > -1e-4 ? ((Math.atan(Math.atan(x))) >= 0 ? 1e-4 : -1e-4) : (Math.atan(Math.atan(x))))))) > -1e-4 ? ((Math.min(1e4, Math.max(-1e4, ((-1.66618 * x)) / ((Math.atan(Math.atan(x))) < 1e-4 && (Math.atan(Math.atan(x))) > -1e-4 ? ((Math.atan(Math.atan(x))) >= 0 ? 1e-4 : -1e-4) : (Math.atan(Math.atan(x))))))) >= 0 ? 1e-4 : -1e-4) : (Math.min(1e4, Math.max(-1e4, ((-1.66618 * x)) / ((Math.atan(Math.atan(x))) < 1e-4 && (Math.atan(Math.atan(x))) > -1e-4 ? ((Math.atan(Math.atan(x))) >= 0 ? 1e-4 : -1e-4) : (Math.atan(Math.atan(x))))))))))) + 1.501624)),
1146
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((3896.479658f * fminf(fmaxf(((logf(fmaxf(1.0e-30f, sqrtf(fabsf(x)))) - 2.971801f) / copysignf(fmaxf(fabsf(fminf(fmaxf(((-1.66618f * x) / copysignf(fmaxf(fabsf(atanf(atanf(x))), 1.0e-4f), atanf(atanf(x)))), -1.0e4f), 1.0e4f)), 1.0e-4f), fminf(fmaxf(((-1.66618f * x) / copysignf(fmaxf(fabsf(atanf(atanf(x))), 1.0e-4f), atanf(atanf(x)))), -1.0e4f), 1.0e4f))), -1.0e4f), 1.0e4f)) + 1.501624f);\n}",
1147
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((3896.479658 * ((torch.log(torch.clamp(torch.sqrt(torch.abs(x)), min=1e-30)) - 2.971801) / (abs(((-1.66618 * x) / (abs(torch.atan(torch.atan(x))) < 1e-4 ? 1e-4 : torch.atan(torch.atan(x))))) < 1e-4 ? 1e-4 : ((-1.66618 * x) / (abs(torch.atan(torch.atan(x))) < 1e-4 ? 1e-4 : torch.atan(torch.atan(x))))))) + 1.501624)",
1146
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((3896.479658f * fminf(fmaxf(((logf(fmaxf(1.0e-30f, sqrtf(fabsf(x)))) - 2.971801f) / copysignf(fmaxf(fabsf(fminf(fmaxf(((-1.66618f * x) / copysignf(fmaxf(fabsf(atanf(atanf(x))), 1.0e-4f), atanf(atanf(x)))), -1.0e4f), 1.0e4f)), 1.0e-4f), fminf(fmaxf(((-1.66618f * x) / copysignf(fmaxf(fabsf(atanf(atanf(x))), 1.0e-4f), atanf(atanf(x)))), -1.0e4f), 1.0e4f))), -1.0e4f), 1.0e4f)) + 1.501624f);\n}",
1147
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((3896.479658 * ((torch.log(torch.clamp(torch.sqrt(torch.abs(x)), min=1e-30)) - 2.971801) / (abs(((-1.66618 * x) / (abs(torch.atan(torch.atan(x))) < 1e-4 ? 1e-4 : torch.atan(torch.atan(x))))) < 1e-4 ? 1e-4 : ((-1.66618 * x) / (abs(torch.atan(torch.atan(x))) < 1e-4 ? 1e-4 : torch.atan(torch.atan(x))))))) + 1.501624)",
1148
1148
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AhYCA2VudgRhdGFuAAEDZW52A2xvZwABAwIBAAcJAQVzcGVhcgACCsYBAcMBAESIvruV9XCuQCAAmZ9EoMLr/ktItDmlEAFEwsJJmj/GB0ChRA39E1ysqPq/IACiIAAQABAAmUQtQxzr4jYaP6UgABAAEACmo0QAAAAAAIjDwKVEAAAAAACIw0CkmUQtQxzr4jYaP6VEDf0TXKyo+r8gAKIgABAAEACZRC1DHOviNho/pSAAEAAQAKajRAAAAAAAiMPApUQAAAAAAIjDQKSmo0QAAAAAAIjDwKVEAAAAAACIw0CkokQiOC7jpgb4P6AL",
1149
1149
  },
1150
1150
  fast: {
1151
1151
  js: "((x) => Math.min(1e4, Math.max(-1e4, ((-1.637862 + (-0.43866 * Math.sqrt(Math.abs(x))))) / ((Math.min(1e4, Math.max(-1e4, (x) / ((Math.min(-0.661473, x)) < 1e-4 && (Math.min(-0.661473, x)) > -1e-4 ? ((Math.min(-0.661473, x)) >= 0 ? 1e-4 : -1e-4) : (Math.min(-0.661473, x)))))) < 1e-4 && (Math.min(1e4, Math.max(-1e4, (x) / ((Math.min(-0.661473, x)) < 1e-4 && (Math.min(-0.661473, x)) > -1e-4 ? ((Math.min(-0.661473, x)) >= 0 ? 1e-4 : -1e-4) : (Math.min(-0.661473, x)))))) > -1e-4 ? ((Math.min(1e4, Math.max(-1e4, (x) / ((Math.min(-0.661473, x)) < 1e-4 && (Math.min(-0.661473, x)) > -1e-4 ? ((Math.min(-0.661473, x)) >= 0 ? 1e-4 : -1e-4) : (Math.min(-0.661473, x)))))) >= 0 ? 1e-4 : -1e-4) : (Math.min(1e4, Math.max(-1e4, (x) / ((Math.min(-0.661473, x)) < 1e-4 && (Math.min(-0.661473, x)) > -1e-4 ? ((Math.min(-0.661473, x)) >= 0 ? 1e-4 : -1e-4) : (Math.min(-0.661473, x))))))))))",
1152
1152
  eval: ((x) => Math.min(1e4, Math.max(-1e4, ((-1.637862 + (-0.43866 * Math.sqrt(Math.abs(x))))) / ((Math.min(1e4, Math.max(-1e4, (x) / ((Math.min(-0.661473, x)) < 1e-4 && (Math.min(-0.661473, x)) > -1e-4 ? ((Math.min(-0.661473, x)) >= 0 ? 1e-4 : -1e-4) : (Math.min(-0.661473, x)))))) < 1e-4 && (Math.min(1e4, Math.max(-1e4, (x) / ((Math.min(-0.661473, x)) < 1e-4 && (Math.min(-0.661473, x)) > -1e-4 ? ((Math.min(-0.661473, x)) >= 0 ? 1e-4 : -1e-4) : (Math.min(-0.661473, x)))))) > -1e-4 ? ((Math.min(1e4, Math.max(-1e4, (x) / ((Math.min(-0.661473, x)) < 1e-4 && (Math.min(-0.661473, x)) > -1e-4 ? ((Math.min(-0.661473, x)) >= 0 ? 1e-4 : -1e-4) : (Math.min(-0.661473, x)))))) >= 0 ? 1e-4 : -1e-4) : (Math.min(1e4, Math.max(-1e4, (x) / ((Math.min(-0.661473, x)) < 1e-4 && (Math.min(-0.661473, x)) > -1e-4 ? ((Math.min(-0.661473, x)) >= 0 ? 1e-4 : -1e-4) : (Math.min(-0.661473, x)))))))))),
1153
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf(((-1.637862f + (-0.43866f * sqrtf(fabsf(x)))) / copysignf(fmaxf(fabsf(fminf(fmaxf((x / copysignf(fmaxf(fabsf(fminf(-0.661473f, x)), 1.0e-4f), fminf(-0.661473f, x))), -1.0e4f), 1.0e4f)), 1.0e-4f), fminf(fmaxf((x / copysignf(fmaxf(fabsf(fminf(-0.661473f, x)), 1.0e-4f), fminf(-0.661473f, x))), -1.0e4f), 1.0e4f))), -1.0e4f), 1.0e4f);\n}",
1154
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-1.637862 + (-0.43866 * torch.sqrt(torch.abs(x)))) / (abs((x / (abs(torch.minimum(-0.661473, x)) < 1e-4 ? 1e-4 : torch.minimum(-0.661473, x)))) < 1e-4 ? 1e-4 : (x / (abs(torch.minimum(-0.661473, x)) < 1e-4 ? 1e-4 : torch.minimum(-0.661473, x)))))",
1153
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf(((-1.637862f + (-0.43866f * sqrtf(fabsf(x)))) / copysignf(fmaxf(fabsf(fminf(fmaxf((x / copysignf(fmaxf(fabsf(fminf(-0.661473f, x)), 1.0e-4f), fminf(-0.661473f, x))), -1.0e4f), 1.0e4f)), 1.0e-4f), fminf(fmaxf((x / copysignf(fmaxf(fabsf(fminf(-0.661473f, x)), 1.0e-4f), fminf(-0.661473f, x))), -1.0e4f), 1.0e4f))), -1.0e4f), 1.0e4f);\n}",
1154
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-1.637862 + (-0.43866 * torch.sqrt(torch.abs(x)))) / (abs((x / (abs(torch.minimum(-0.661473, x)) < 1e-4 ? 1e-4 : torch.minimum(-0.661473, x)))) < 1e-4 ? 1e-4 : (x / (abs(torch.minimum(-0.661473, x)) < 1e-4 ? 1e-4 : torch.minimum(-0.661473, x)))))",
1155
1155
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACrQBAbEBAERHx9XIrjT6v0QXDoRkARPcvyAAmZ+ioCAARPj7xWzJKuW/IACkmUQtQxzr4jYaP6VE+PvFbMkq5b8gAKSmo0QAAAAAAIjDwKVEAAAAAACIw0CkmUQtQxzr4jYaP6UgAET4+8VsySrlvyAApJlELUMc6+I2Gj+lRPj7xWzJKuW/IACkpqNEAAAAAACIw8ClRAAAAAAAiMNApKajRAAAAAAAiMPApUQAAAAAAIjDQKQL",
1156
1156
  },
1157
1157
  meta: {
@@ -1168,15 +1168,15 @@ const kernels = {
1168
1168
  precise: {
1169
1169
  js: "((x) => ((-0.745669 * Math.max((0.637798 - Math.atan(x)), (Math.cos(Math.log(Math.max(1e-30, x))) * 1.108946))) + 0.304632))",
1170
1170
  eval: ((x) => ((-0.745669 * Math.max((0.637798 - Math.atan(x)), (Math.cos(Math.log(Math.max(1e-30, x))) * 1.108946))) + 0.304632)),
1171
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.745669f * fmaxf((0.637798f - atanf(x)), (cosf(logf(fmaxf(1.0e-30f, x))) * 1.108946f))) + 0.304632f);\n}",
1172
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-0.745669 * torch.maximum((0.637798 - torch.atan(x)), (torch.cos(torch.log(torch.clamp(x, min=1e-30))) * 1.108946))) + 0.304632)",
1171
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.745669f * fmaxf((0.637798f - atanf(x)), (cosf(logf(fmaxf(1.0e-30f, x))) * 1.108946f))) + 0.304632f);\n}",
1172
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-0.745669 * torch.maximum((0.637798 - torch.atan(x)), (torch.cos(torch.log(torch.clamp(x, min=1e-30))) * 1.108946))) + 0.304632)",
1173
1173
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AiADA2VudgNjb3MAAQNlbnYEYXRhbgABA2VudgNsb2cAAQMCAQAHCQEFc3BlYXIAAwpBAT8AREWDFDyF3Oe/RN+I7lnXaOQ/IAAQAaEgAESgwuv+S0i0OaUQAhAARPJ6MCk+vvE/oqWiRCQqVDcXf9M/oAs=",
1174
1174
  },
1175
1175
  fast: {
1176
1176
  js: "((x) => ((0.747172 * Math.log(Math.max(1e-30, Math.min(1e4, Math.max(-1e4, (-0.479425) / ((Math.min(1e4, Math.max(-1e4, (-0.652482) / ((x) < 1e-4 && (x) > -1e-4 ? ((x) >= 0 ? 1e-4 : -1e-4) : (x))))) < 1e-4 && (Math.min(1e4, Math.max(-1e4, (-0.652482) / ((x) < 1e-4 && (x) > -1e-4 ? ((x) >= 0 ? 1e-4 : -1e-4) : (x))))) > -1e-4 ? ((Math.min(1e4, Math.max(-1e4, (-0.652482) / ((x) < 1e-4 && (x) > -1e-4 ? ((x) >= 0 ? 1e-4 : -1e-4) : (x))))) >= 0 ? 1e-4 : -1e-4) : (Math.min(1e4, Math.max(-1e4, (-0.652482) / ((x) < 1e-4 && (x) > -1e-4 ? ((x) >= 0 ? 1e-4 : -1e-4) : (x))))))))))) + -5.331985))",
1177
1177
  eval: ((x) => ((0.747172 * Math.log(Math.max(1e-30, Math.min(1e4, Math.max(-1e4, (-0.479425) / ((Math.min(1e4, Math.max(-1e4, (-0.652482) / ((x) < 1e-4 && (x) > -1e-4 ? ((x) >= 0 ? 1e-4 : -1e-4) : (x))))) < 1e-4 && (Math.min(1e4, Math.max(-1e4, (-0.652482) / ((x) < 1e-4 && (x) > -1e-4 ? ((x) >= 0 ? 1e-4 : -1e-4) : (x))))) > -1e-4 ? ((Math.min(1e4, Math.max(-1e4, (-0.652482) / ((x) < 1e-4 && (x) > -1e-4 ? ((x) >= 0 ? 1e-4 : -1e-4) : (x))))) >= 0 ? 1e-4 : -1e-4) : (Math.min(1e4, Math.max(-1e4, (-0.652482) / ((x) < 1e-4 && (x) > -1e-4 ? ((x) >= 0 ? 1e-4 : -1e-4) : (x))))))))))) + -5.331985)),
1178
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.747172f * logf(fmaxf(1.0e-30f, fminf(fmaxf((-0.479425f / copysignf(fmaxf(fabsf(fminf(fmaxf((-0.652482f / copysignf(fmaxf(fabsf(x), 1.0e-4f), x)), -1.0e4f), 1.0e4f)), 1.0e-4f), fminf(fmaxf((-0.652482f / copysignf(fmaxf(fabsf(x), 1.0e-4f), x)), -1.0e4f), 1.0e4f))), -1.0e4f), 1.0e4f)))) + -5.331985f);\n}",
1179
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.747172 * torch.log(torch.clamp((-0.479425 / (abs((-0.652482 / (abs(x) < 1e-4 ? 1e-4 : x))) < 1e-4 ? 1e-4 : (-0.652482 / (abs(x) < 1e-4 ? 1e-4 : x)))), min=1e-30))) + -5.331985)",
1178
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.747172f * logf(fmaxf(1.0e-30f, fminf(fmaxf((-0.479425f / copysignf(fmaxf(fabsf(fminf(fmaxf((-0.652482f / copysignf(fmaxf(fabsf(x), 1.0e-4f), x)), -1.0e4f), 1.0e4f)), 1.0e-4f), fminf(fmaxf((-0.652482f / copysignf(fmaxf(fabsf(x), 1.0e-4f), x)), -1.0e4f), 1.0e4f))), -1.0e4f), 1.0e4f)))) + -5.331985f);\n}",
1179
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.747172 * torch.log(torch.clamp((-0.479425 / (abs((-0.652482 / (abs(x) < 1e-4 ? 1e-4 : x))) < 1e-4 ? 1e-4 : (-0.652482 / (abs(x) < 1e-4 ? 1e-4 : x)))), min=1e-30))) + -5.331985)",
1180
1180
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNsb2cAAQMCAQAHCQEFc3BlYXIAAQqrAQGoAQBEyJQPQdXo5z9EkKD4Meau3r9ESFFn7iHh5L8gAJlELUMc6+I2Gj+lIACmo0QAAAAAAIjDwKVEAAAAAACIw0CkmUQtQxzr4jYaP6VESFFn7iHh5L8gAJlELUMc6+I2Gj+lIACmo0QAAAAAAIjDwKVEAAAAAACIw0CkpqNEAAAAAACIw8ClRAAAAAAAiMNApESgwuv+S0i0OaUQAKJE3Qw34PNTFcCgCw==",
1181
1181
  },
1182
1182
  meta: {
@@ -1193,15 +1193,15 @@ const kernels = {
1193
1193
  precise: {
1194
1194
  js: "((x) => ((-0.355956 * Math.cos(Math.max((0.722591 * (x + 1.095797)), Math.max(1.232444, x)))) + 0.1349))",
1195
1195
  eval: ((x) => ((-0.355956 * Math.cos(Math.max((0.722591 * (x + 1.095797)), Math.max(1.232444, x)))) + 0.1349)),
1196
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.355956f * cosf(fmaxf((0.722591f * (x + 1.095797f)), fmaxf(1.232444f, x)))) + 0.1349f);\n}",
1197
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-0.355956 * torch.cos(torch.maximum((0.722591 * (x + 1.095797)), torch.maximum(1.232444, x)))) + 0.1349)",
1196
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.355956f * cosf(fmaxf((0.722591f * (x + 1.095797f)), fmaxf(1.232444f, x)))) + 0.1349f);\n}",
1197
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-0.355956 * torch.cos(torch.maximum((0.722591 * (x + 1.095797)), torch.maximum(1.232444, x)))) + 0.1349)",
1198
1198
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNjb3MAAQMCAQAHCQEFc3BlYXIAAQo9ATsARJEotKz7x9a/RDRJLCl3H+c/IABE6+Bgb2KI8T+gokQ8bCIzF7jzPyAApaUQAKJEv30dOGdEwT+gCw==",
1199
1199
  },
1200
1200
  fast: {
1201
1201
  js: "((x) => Math.cos(Math.max((0.794393 * (x + 0.979408)), Math.max(1.234601, x))))",
1202
1202
  eval: ((x) => Math.cos(Math.max((0.794393 * (x + 0.979408)), Math.max(1.234601, x)))),
1203
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return cosf(fmaxf((0.794393f * (x + 0.979408f)), fmaxf(1.234601f, x)));\n}",
1204
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.cos(torch.maximum((0.794393 * (x + 0.979408)), torch.maximum(1.234601, x)))",
1203
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return cosf(fmaxf((0.794393f * (x + 0.979408f)), fmaxf(1.234601f, x)));\n}",
1204
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.cos(torch.maximum((0.794393 * (x + 0.979408)), torch.maximum(1.234601, x)))",
1205
1205
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNjb3MAAQMCAQAHCQEFc3BlYXIAAQopAScARIV7Zd6qa+k/IABExRouck9X7z+gokQKvmn67MDzPyAApaUQAAs=",
1206
1206
  },
1207
1207
  meta: {
@@ -1218,15 +1218,15 @@ const kernels = {
1218
1218
  precise: {
1219
1219
  js: "((x) => ((-2.9209753441117647 * Math.sqrt(Math.abs((Math.exp(Math.max(-50, Math.min(50, Math.exp(Math.max(-50, Math.min(50, x)))))) * Math.log(Math.max(1e-30, x)))))) + 5.533519427397523))",
1220
1220
  eval: ((x) => ((-2.9209753441117647 * Math.sqrt(Math.abs((Math.exp(Math.max(-50, Math.min(50, Math.exp(Math.max(-50, Math.min(50, x)))))) * Math.log(Math.max(1e-30, x)))))) + 5.533519427397523)),
1221
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-2.920975f * sqrtf(fabsf((expf(fmaxf(-50.0f, fminf(50.0f, expf(fmaxf(-50.0f, fminf(50.0f, x)))))) * logf(fmaxf(1.0e-30f, x)))))) + 5.533519f);\n}",
1222
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-2.920975 * torch.sqrt(torch.abs((torch.exp(torch.clamp(torch.exp(torch.clamp(x, -50.0, 50.0)), -50.0, 50.0)) * torch.log(torch.clamp(x, min=1e-30)))))) + 5.533519)",
1221
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-2.920975f * sqrtf(fabsf((expf(fmaxf(-50.0f, fminf(50.0f, expf(fmaxf(-50.0f, fminf(50.0f, x)))))) * logf(fmaxf(1.0e-30f, x)))))) + 5.533519f);\n}",
1222
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-2.920975 * torch.sqrt(torch.abs((torch.exp(torch.clamp(torch.exp(torch.clamp(x, -50.0, 50.0)), -50.0, 50.0)) * torch.log(torch.clamp(x, min=1e-30)))))) + 5.533519)",
1223
1223
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AhUCA2VudgNleHAAAQNlbnYDbG9nAAEDAgEABwkBBXNwZWFyAAIKVwFVAEQbDztSKF4HwCAARAAAAAAAAEnApUQAAAAAAABJQKQQAEQAAAAAAABJwKVEAAAAAAAASUCkEAAgAESgwuv+S0i0OaUQAaKZn6JE4c+x6lIiFkCgCw==",
1224
1224
  },
1225
1225
  fast: {
1226
1226
  js: "((x) => ((2.1266220342385473 * (((x) * (x) + Math.log(Math.max(1e-30, Math.sqrt(Math.abs(x))))) + (((x) * (x) * (x)) * ((x) * (x) * (x))) * (((x) * (x) * (x)) * ((x) * (x) * (x))) * (((x) * (x) * (x)) * ((x) * (x) * (x))))) + 0.2244487406420216))",
1227
1227
  eval: ((x) => ((2.1266220342385473 * (((x) * (x) + Math.log(Math.max(1e-30, Math.sqrt(Math.abs(x))))) + (((x) * (x) * (x)) * ((x) * (x) * (x))) * (((x) * (x) * (x)) * ((x) * (x) * (x))) * (((x) * (x) * (x)) * ((x) * (x) * (x))))) + 0.2244487406420216)),
1228
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((2.126622f * ((powf(x, 2.0f) + logf(fmaxf(1.0e-30f, sqrtf(fabsf(x))))) + powf(powf(powf(x, 3.0f), 2.0f), 3.0f))) + 0.224449f);\n}",
1229
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((2.126622 * (((x * x) + torch.log(torch.clamp(torch.sqrt(torch.abs(x)), min=1e-30))) + (((x ** 3) * (x ** 3)) ** 3))) + 0.224449)",
1228
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((2.126622f * ((powf(x, 2.0f) + logf(fmaxf(1.0e-30f, sqrtf(fabsf(x))))) + powf(powf(powf(x, 3.0f), 2.0f), 3.0f))) + 0.224449f);\n}",
1229
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((2.126622 * (((x * x) + torch.log(torch.clamp(torch.sqrt(torch.abs(x)), min=1e-30))) + (((x ** 3) * (x ** 3)) ** 3))) + 0.224449)",
1230
1230
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNsb2cAAQMCAQAHCQEFc3BlYXIAAQpkAWIARHgPwGlSAwFAIAAgAKIgAJmfRKDC6/5LSLQ5pRAAoCAAIAAgAKKiIAAgACAAoqKiIAAgACAAoqIgACAAIACioqIgACAAIACioiAAIAAgAKKioqKioKJEjcpXgLy6zD+gCw==",
1231
1231
  },
1232
1232
  meta: {
@@ -1243,15 +1243,15 @@ const kernels = {
1243
1243
  precise: {
1244
1244
  js: "((p, b) => ((1.000326 * Math.max(0.0003, (p - Math.min(1e4, Math.max(-1e4, ((1.000014 - p)) / ((b) < 1e-4 && (b) > -1e-4 ? ((b) >= 0 ? 1e-4 : -1e-4) : (b))))))) + -0.000194))",
1245
1245
  eval: ((p, b) => ((1.000326 * Math.max(0.0003, (p - Math.min(1e4, Math.max(-1e4, ((1.000014 - p)) / ((b) < 1e-4 && (b) > -1e-4 ? ((b) >= 0 ? 1e-4 : -1e-4) : (b))))))) + -0.000194)),
1246
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.000326f * fmaxf(0.0003f, (p - fminf(fmaxf(((1.000014f - p) / copysignf(fmaxf(fabsf(b), 1.0e-4f), b)), -1.0e4f), 1.0e4f)))) + -0.000194f);\n}",
1247
- py: "import torch\n\ndef spear_fn(p, b):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((1.000326 * torch.maximum(0.0003, (p - ((1.000014 - p) / (abs(b) < 1e-4 ? 1e-4 : b))))) + -0.000194)",
1246
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.000326f * fmaxf(0.0003f, (p - fminf(fmaxf(((1.000014f - p) / copysignf(fmaxf(fabsf(b), 1.0e-4f), b)), -1.0e4f), 1.0e4f)))) + -0.000194f);\n}",
1247
+ py: "import torch\n\ndef spear_fn(p, b):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((1.000326 * torch.maximum(0.0003, (p - ((1.000014 - p) / (abs(b) < 1e-4 ? 1e-4 : b))))) + -0.000194)",
1248
1248
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAMCAQAHCQEFc3BlYXIAAApWAVQARHtq9dVVAfA/RGEyVTAqqTM/IABEn6wYrg4A8D8gAKEgAZlELUMc6+I2Gj+lIAGmo0QAAAAAAIjDwKVEAAAAAACIw0CkoaWiRAq8k0+PbSm/oAs=",
1249
1249
  },
1250
1250
  fast: {
1251
1251
  js: "((p, b) => Math.max(0.001, ((p * 1.05) - Math.min(1e4, Math.max(-1e4, ((1.018793 - p)) / ((b) < 1e-4 && (b) > -1e-4 ? ((b) >= 0 ? 1e-4 : -1e-4) : (b)))))))",
1252
1252
  eval: ((p, b) => Math.max(0.001, ((p * 1.05) - Math.min(1e4, Math.max(-1e4, ((1.018793 - p)) / ((b) < 1e-4 && (b) > -1e-4 ? ((b) >= 0 ? 1e-4 : -1e-4) : (b))))))),
1253
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fmaxf(0.001f, ((p * 1.05f) - fminf(fmaxf(((1.018793f - p) / copysignf(fmaxf(fabsf(b), 1.0e-4f), b)), -1.0e4f), 1.0e4f)));\n}",
1254
- py: "import torch\n\ndef spear_fn(p, b):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.maximum(0.001, ((p * 1.05) - ((1.018793 - p) / (abs(b) < 1e-4 ? 1e-4 : b))))",
1253
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fmaxf(0.001f, ((p * 1.05f) - fminf(fmaxf(((1.018793f - p) / copysignf(fmaxf(fabsf(b), 1.0e-4f), b)), -1.0e4f), 1.0e4f)));\n}",
1254
+ py: "import torch\n\ndef spear_fn(p, b):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.maximum(0.001, ((p * 1.05) - ((1.018793 - p) / (abs(b) < 1e-4 ? 1e-4 : b))))",
1255
1255
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAMCAQAHCQEFc3BlYXIAAApMAUoARPyp8dJNYlA/IABEzczMzMzM8D+iRLZMhuP5TPA/IAChIAGZRC1DHOviNho/pSABpqNEAAAAAACIw8ClRAAAAAAAiMNApKGlCw==",
1256
1256
  },
1257
1257
  meta: {
@@ -1268,8 +1268,8 @@ const kernels = {
1268
1268
  precise: {
1269
1269
  js: "((g, l) => (100 * Math.min(1e4, Math.max(-1e4, (g) / (((g + l)) < 1e-4 && ((g + l)) > -1e-4 ? (((g + l)) >= 0 ? 1e-4 : -1e-4) : ((g + l)))))))",
1270
1270
  eval: ((g, l) => (100 * Math.min(1e4, Math.max(-1e4, (g) / (((g + l)) < 1e-4 && ((g + l)) > -1e-4 ? (((g + l)) >= 0 ? 1e-4 : -1e-4) : ((g + l))))))),
1271
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (100f * fminf(fmaxf((g / copysignf(fmaxf(fabsf((g + l)), 1.0e-4f), (g + l))), -1.0e4f), 1.0e4f));\n}",
1272
- py: "import torch\n\ndef spear_fn(g, l):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (100 * (g / (abs((g + l)) < 1e-4 ? 1e-4 : (g + l))))",
1271
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (100f * fminf(fmaxf((g / copysignf(fmaxf(fabsf((g + l)), 1.0e-4f), (g + l))), -1.0e4f), 1.0e4f));\n}",
1272
+ py: "import torch\n\ndef spear_fn(g, l):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (100 * (g / (abs((g + l)) < 1e-4 ? 1e-4 : (g + l))))",
1273
1273
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAMCAQAHCQEFc3BlYXIAAAo7ATkARAAAAAAAAFlAIAAgACABoJlELUMc6+I2Gj+lIAAgAaCmo0QAAAAAAIjDwKVEAAAAAACIw0Ckogs=",
1274
1274
  },
1275
1275
  meta: {
@@ -1286,8 +1286,8 @@ const kernels = {
1286
1286
  precise: {
1287
1287
  js: "((k, t, s, c) => ((0.00926116583719156 * ((k * t) + ((s * 7.58799) - (k * Math.sqrt(Math.abs(c)))))) + -3.0131695155378804))",
1288
1288
  eval: ((k, t, s, c) => ((0.00926116583719156 * ((k * t) + ((s * 7.58799) - (k * Math.sqrt(Math.abs(c)))))) + -3.0131695155378804)),
1289
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.009261f * ((k * t) + ((s * 7.58799f) - (k * sqrtf(fabsf(c)))))) + -3.01317f);\n}",
1290
- py: "import torch\n\ndef spear_fn(k, t, s, c):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.009261 * ((k * t) + ((s * 7.58799) - (k * torch.sqrt(torch.abs(c)))))) + -3.01317)",
1289
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.009261f * ((k * t) + ((s * 7.58799f) - (k * sqrtf(fabsf(c)))))) + -3.01317f);\n}",
1290
+ py: "import torch\n\ndef spear_fn(k, t, s, c):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.009261 * ((k * t) + ((s * 7.58799) - (k * torch.sqrt(torch.abs(c)))))) + -3.01317)",
1291
1291
  wasmBase64: "AGFzbQEAAAABDgJgBHx8fHwBfGABfAF8AwIBAAcJAQVzcGVhcgAACjIBMABEIwgmo4T3gj8gACABoiACRAqA8QwaWh5AoiAAIAOZn6KhoKJEnFB0nvgaCMCgCw==",
1292
1292
  },
1293
1293
  meta: {
@@ -1304,15 +1304,15 @@ const kernels = {
1304
1304
  precise: {
1305
1305
  js: "((s) => ((5.180819843767829 * (Math.min(1e4, Math.max(-1e4, ((s + -75.797025)) / (((s - -3.997718)) < 1e-4 && ((s - -3.997718)) > -1e-4 ? (((s - -3.997718)) >= 0 ? 1e-4 : -1e-4) : ((s - -3.997718))))) - Math.min(1e4, Math.max(-1e4, (-2.586911) / ((Math.max(s, (s - -3.930559))) < 1e-4 && (Math.max(s, (s - -3.930559))) > -1e-4 ? ((Math.max(s, (s - -3.930559))) >= 0 ? 1e-4 : -1e-4) : (Math.max(s, (s - -3.930559)))))))) + 94.81919572289306))",
1306
1306
  eval: ((s) => ((5.180819843767829 * (Math.min(1e4, Math.max(-1e4, ((s + -75.797025)) / (((s - -3.997718)) < 1e-4 && ((s - -3.997718)) > -1e-4 ? (((s - -3.997718)) >= 0 ? 1e-4 : -1e-4) : ((s - -3.997718))))) - Math.min(1e4, Math.max(-1e4, (-2.586911) / ((Math.max(s, (s - -3.930559))) < 1e-4 && (Math.max(s, (s - -3.930559))) > -1e-4 ? ((Math.max(s, (s - -3.930559))) >= 0 ? 1e-4 : -1e-4) : (Math.max(s, (s - -3.930559)))))))) + 94.81919572289306)),
1307
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((5.18082f * (fminf(fmaxf(((s + -75.797025f) / copysignf(fmaxf(fabsf((s - -3.997718f)), 1.0e-4f), (s - -3.997718f))), -1.0e4f), 1.0e4f) - fminf(fmaxf((-2.586911f / copysignf(fmaxf(fabsf(fmaxf(s, (s - -3.930559f))), 1.0e-4f), fmaxf(s, (s - -3.930559f)))), -1.0e4f), 1.0e4f))) + 94.819196f);\n}",
1308
- py: "import torch\n\ndef spear_fn(s):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((5.18082 * (((s + -75.797025) / (abs((s - -3.997718)) < 1e-4 ? 1e-4 : (s - -3.997718))) - (-2.586911 / (abs(torch.maximum(s, (s - -3.930559))) < 1e-4 ? 1e-4 : torch.maximum(s, (s - -3.930559)))))) + 94.819196)",
1307
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((5.18082f * (fminf(fmaxf(((s + -75.797025f) / copysignf(fmaxf(fabsf((s - -3.997718f)), 1.0e-4f), (s - -3.997718f))), -1.0e4f), 1.0e4f) - fminf(fmaxf((-2.586911f / copysignf(fmaxf(fabsf(fmaxf(s, (s - -3.930559f))), 1.0e-4f), fmaxf(s, (s - -3.930559f)))), -1.0e4f), 1.0e4f))) + 94.819196f);\n}",
1308
+ py: "import torch\n\ndef spear_fn(s):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((5.18082 * (((s + -75.797025) / (abs((s - -3.997718)) < 1e-4 ? 1e-4 : (s - -3.997718))) - (-2.586911 / (abs(torch.maximum(s, (s - -3.930559))) < 1e-4 ? 1e-4 : torch.maximum(s, (s - -3.930559)))))) + 94.819196)",
1309
1309
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACqcBAaQBAER4zU3WKLkUQCAARAtGJXUC81LAoCAARFILJZNT+w/AoZlELUMc6+I2Gj+lIABEUgslk1P7D8ChpqNEAAAAAACIw8ClRAAAAAAAiMNApEQfTfVk/rEEwCAAIABE2/y/6shxD8ChpZlELUMc6+I2Gj+lIAAgAETb/L/qyHEPwKGlpqNEAAAAAACIw8ClRAAAAAAAiMNApKGiRFK25bNttFdAoAs=",
1310
1310
  },
1311
1311
  fast: {
1312
1312
  js: "((s) => (Math.min(1e4, Math.max(-1e4, (-79.794743) / (((s - -3.997718)) < 1e-4 && ((s - -3.997718)) > -1e-4 ? (((s - -3.997718)) >= 0 ? 1e-4 : -1e-4) : ((s - -3.997718))))) - Math.min(1e4, Math.max(-1e4, (-2.586911) / ((Math.max(-79.794743, (s - -3.930559))) < 1e-4 && (Math.max(-79.794743, (s - -3.930559))) > -1e-4 ? ((Math.max(-79.794743, (s - -3.930559))) >= 0 ? 1e-4 : -1e-4) : (Math.max(-79.794743, (s - -3.930559))))))))",
1313
1313
  eval: ((s) => (Math.min(1e4, Math.max(-1e4, (-79.794743) / (((s - -3.997718)) < 1e-4 && ((s - -3.997718)) > -1e-4 ? (((s - -3.997718)) >= 0 ? 1e-4 : -1e-4) : ((s - -3.997718))))) - Math.min(1e4, Math.max(-1e4, (-2.586911) / ((Math.max(-79.794743, (s - -3.930559))) < 1e-4 && (Math.max(-79.794743, (s - -3.930559))) > -1e-4 ? ((Math.max(-79.794743, (s - -3.930559))) >= 0 ? 1e-4 : -1e-4) : (Math.max(-79.794743, (s - -3.930559)))))))),
1314
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (fminf(fmaxf((-79.794743f / copysignf(fmaxf(fabsf((s - -3.997718f)), 1.0e-4f), (s - -3.997718f))), -1.0e4f), 1.0e4f) - fminf(fmaxf((-2.586911f / copysignf(fmaxf(fabsf(fmaxf(-79.794743f, (s - -3.930559f))), 1.0e-4f), fmaxf(-79.794743f, (s - -3.930559f)))), -1.0e4f), 1.0e4f));\n}",
1315
- py: "import torch\n\ndef spear_fn(s):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-79.794743 / (abs((s - -3.997718)) < 1e-4 ? 1e-4 : (s - -3.997718))) - (-2.586911 / (abs(torch.maximum(-79.794743, (s - -3.930559))) < 1e-4 ? 1e-4 : torch.maximum(-79.794743, (s - -3.930559)))))",
1314
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (fminf(fmaxf((-79.794743f / copysignf(fmaxf(fabsf((s - -3.997718f)), 1.0e-4f), (s - -3.997718f))), -1.0e4f), 1.0e4f) - fminf(fmaxf((-2.586911f / copysignf(fmaxf(fabsf(fmaxf(-79.794743f, (s - -3.930559f))), 1.0e-4f), fmaxf(-79.794743f, (s - -3.930559f)))), -1.0e4f), 1.0e4f));\n}",
1315
+ py: "import torch\n\ndef spear_fn(s):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-79.794743 / (abs((s - -3.997718)) < 1e-4 ? 1e-4 : (s - -3.997718))) - (-2.586911 / (abs(torch.maximum(-79.794743, (s - -3.930559))) < 1e-4 ? 1e-4 : torch.maximum(-79.794743, (s - -3.930559)))))",
1316
1316
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACp4BAZsBAERlbr4R3fJTwCAARFILJZNT+w/AoZlELUMc6+I2Gj+lIABEUgslk1P7D8ChpqNEAAAAAACIw8ClRAAAAAAAiMNApEQfTfVk/rEEwERlbr4R3fJTwCAARNv8v+rIcQ/AoaWZRC1DHOviNho/pURlbr4R3fJTwCAARNv8v+rIcQ/AoaWmo0QAAAAAAIjDwKVEAAAAAACIw0CkoQs=",
1317
1317
  },
1318
1318
  meta: {
@@ -1329,15 +1329,15 @@ const kernels = {
1329
1329
  precise: {
1330
1330
  js: "((da, t) => Math.min(1e4, Math.max(-1e4, (1) / (((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t)))))))))) < 1e-4 && ((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t)))))))))) > -1e-4 ? (((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t)))))))))) >= 0 ? 1e-4 : -1e-4) : ((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t))))))))))))))",
1331
1331
  eval: ((da, t) => Math.min(1e4, Math.max(-1e4, (1) / (((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t)))))))))) < 1e-4 && ((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t)))))))))) > -1e-4 ? (((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t)))))))))) >= 0 ? 1e-4 : -1e-4) : ((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t)))))))))))))),
1332
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((1f / copysignf(fmaxf(fabsf((1f + expf(fmaxf(-50.0f, fminf(50.0f, (-fminf(fmaxf((da / copysignf(fmaxf(fabsf(t), 1.0e-4f), t)), -1.0e4f), 1.0e4f))))))), 1.0e-4f), (1f + expf(fmaxf(-50.0f, fminf(50.0f, (-fminf(fmaxf((da / copysignf(fmaxf(fabsf(t), 1.0e-4f), t)), -1.0e4f), 1.0e4f)))))))), -1.0e4f), 1.0e4f);\n}",
1333
- py: "import torch\n\ndef spear_fn(da, t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (1 / (abs((1 + torch.exp(torch.clamp((-(da / (abs(t) < 1e-4 ? 1e-4 : t))), -50.0, 50.0)))) < 1e-4 ? 1e-4 : (1 + torch.exp(torch.clamp((-(da / (abs(t) < 1e-4 ? 1e-4 : t))), -50.0, 50.0)))))",
1332
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((1f / copysignf(fmaxf(fabsf((1f + expf(fmaxf(-50.0f, fminf(50.0f, (-fminf(fmaxf((da / copysignf(fmaxf(fabsf(t), 1.0e-4f), t)), -1.0e4f), 1.0e4f))))))), 1.0e-4f), (1f + expf(fmaxf(-50.0f, fminf(50.0f, (-fminf(fmaxf((da / copysignf(fmaxf(fabsf(t), 1.0e-4f), t)), -1.0e4f), 1.0e4f)))))))), -1.0e4f), 1.0e4f);\n}",
1333
+ py: "import torch\n\ndef spear_fn(da, t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (1 / (abs((1 + torch.exp(torch.clamp((-(da / (abs(t) < 1e-4 ? 1e-4 : t))), -50.0, 50.0)))) < 1e-4 ? 1e-4 : (1 + torch.exp(torch.clamp((-(da / (abs(t) < 1e-4 ? 1e-4 : t))), -50.0, 50.0)))))",
1334
1334
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAILAQNlbnYDZXhwAAEDAgEABwkBBXNwZWFyAAEKvwEBvAEARAAAAAAAAPA/RAAAAAAAAPA/IAAgAZlELUMc6+I2Gj+lIAGmo0QAAAAAAIjDwKVEAAAAAACIw0CkmkQAAAAAAABJwKVEAAAAAAAASUCkEACgmUQtQxzr4jYaP6VEAAAAAAAA8D8gACABmUQtQxzr4jYaP6UgAaajRAAAAAAAiMPApUQAAAAAAIjDQKSaRAAAAAAAAEnApUQAAAAAAABJQKQQAKCmo0QAAAAAAIjDwKVEAAAAAACIw0CkCw==",
1335
1335
  },
1336
1336
  fast: {
1337
1337
  js: "((da, t) => Math.min(1e4, Math.max(-1e4, (1) / (((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t)))))))))) < 1e-4 && ((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t)))))))))) > -1e-4 ? (((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t)))))))))) >= 0 ? 1e-4 : -1e-4) : ((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t))))))))))))))",
1338
1338
  eval: ((da, t) => Math.min(1e4, Math.max(-1e4, (1) / (((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t)))))))))) < 1e-4 && ((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t)))))))))) > -1e-4 ? (((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t)))))))))) >= 0 ? 1e-4 : -1e-4) : ((1 + Math.exp(Math.max(-50, Math.min(50, (-Math.min(1e4, Math.max(-1e4, (da) / ((t) < 1e-4 && (t) > -1e-4 ? ((t) >= 0 ? 1e-4 : -1e-4) : (t)))))))))))))),
1339
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((1f / copysignf(fmaxf(fabsf((1f + expf(fmaxf(-50.0f, fminf(50.0f, (-fminf(fmaxf((da / copysignf(fmaxf(fabsf(t), 1.0e-4f), t)), -1.0e4f), 1.0e4f))))))), 1.0e-4f), (1f + expf(fmaxf(-50.0f, fminf(50.0f, (-fminf(fmaxf((da / copysignf(fmaxf(fabsf(t), 1.0e-4f), t)), -1.0e4f), 1.0e4f)))))))), -1.0e4f), 1.0e4f);\n}",
1340
- py: "import torch\n\ndef spear_fn(da, t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (1 / (abs((1 + torch.exp(torch.clamp((-(da / (abs(t) < 1e-4 ? 1e-4 : t))), -50.0, 50.0)))) < 1e-4 ? 1e-4 : (1 + torch.exp(torch.clamp((-(da / (abs(t) < 1e-4 ? 1e-4 : t))), -50.0, 50.0)))))",
1339
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((1f / copysignf(fmaxf(fabsf((1f + expf(fmaxf(-50.0f, fminf(50.0f, (-fminf(fmaxf((da / copysignf(fmaxf(fabsf(t), 1.0e-4f), t)), -1.0e4f), 1.0e4f))))))), 1.0e-4f), (1f + expf(fmaxf(-50.0f, fminf(50.0f, (-fminf(fmaxf((da / copysignf(fmaxf(fabsf(t), 1.0e-4f), t)), -1.0e4f), 1.0e4f)))))))), -1.0e4f), 1.0e4f);\n}",
1340
+ py: "import torch\n\ndef spear_fn(da, t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (1 / (abs((1 + torch.exp(torch.clamp((-(da / (abs(t) < 1e-4 ? 1e-4 : t))), -50.0, 50.0)))) < 1e-4 ? 1e-4 : (1 + torch.exp(torch.clamp((-(da / (abs(t) < 1e-4 ? 1e-4 : t))), -50.0, 50.0)))))",
1341
1341
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAILAQNlbnYDZXhwAAEDAgEABwkBBXNwZWFyAAEKvwEBvAEARAAAAAAAAPA/RAAAAAAAAPA/IAAgAZlELUMc6+I2Gj+lIAGmo0QAAAAAAIjDwKVEAAAAAACIw0CkmkQAAAAAAABJwKVEAAAAAAAASUCkEACgmUQtQxzr4jYaP6VEAAAAAAAA8D8gACABmUQtQxzr4jYaP6UgAaajRAAAAAAAiMPApUQAAAAAAIjDQKSaRAAAAAAAAEnApUQAAAAAAABJQKQQAKCmo0QAAAAAAIjDwKVEAAAAAACIw0CkCw==",
1342
1342
  },
1343
1343
  meta: {
@@ -1354,15 +1354,15 @@ const kernels = {
1354
1354
  precise: {
1355
1355
  js: "((vs, vo) => ((-700.007578094087 * Math.min(1e4, Math.max(-1e4, ((vs + vo)) / (((0.049677 - (340.052626 - vs))) < 1e-4 && ((0.049677 - (340.052626 - vs))) > -1e-4 ? (((0.049677 - (340.052626 - vs))) >= 0 ? 1e-4 : -1e-4) : ((0.049677 - (340.052626 - vs))))))) + 699.9998851514688))",
1356
1356
  eval: ((vs, vo) => ((-700.007578094087 * Math.min(1e4, Math.max(-1e4, ((vs + vo)) / (((0.049677 - (340.052626 - vs))) < 1e-4 && ((0.049677 - (340.052626 - vs))) > -1e-4 ? (((0.049677 - (340.052626 - vs))) >= 0 ? 1e-4 : -1e-4) : ((0.049677 - (340.052626 - vs))))))) + 699.9998851514688)),
1357
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-700.007578f * fminf(fmaxf(((vs + vo) / copysignf(fmaxf(fabsf((0.049677f - (340.052626f - vs))), 1.0e-4f), (0.049677f - (340.052626f - vs)))), -1.0e4f), 1.0e4f)) + 699.999885f);\n}",
1358
- py: "import torch\n\ndef spear_fn(vs, vo):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-700.007578 * ((vs + vo) / (abs((0.049677 - (340.052626 - vs))) < 1e-4 ? 1e-4 : (0.049677 - (340.052626 - vs))))) + 699.999885)",
1357
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-700.007578f * fminf(fmaxf(((vs + vo) / copysignf(fmaxf(fabsf((0.049677f - (340.052626f - vs))), 1.0e-4f), (0.049677f - (340.052626f - vs)))), -1.0e4f), 1.0e4f)) + 699.999885f);\n}",
1358
+ py: "import torch\n\ndef spear_fn(vs, vo):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-700.007578 * ((vs + vo) / (abs((0.049677 - (340.052626 - vs))) < 1e-4 ? 1e-4 : (0.049677 - (340.052626 - vs))))) + 699.999885)",
1359
1359
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAMCAQAHCQEFc3BlYXIAAApqAWgARCiSGoUP4IXAIAAgAaBEhA66hENvqT9EtU5cjtdAdUAgAKGhmUQtQxzr4jYaP6VEhA66hENvqT9EtU5cjtdAdUAgAKGhpqNEAAAAAACIw8ClRAAAAAAAiMNApKJEhErJw//fhUCgCw==",
1360
1360
  },
1361
1361
  fast: {
1362
1362
  js: "((vs, vo) => (317.901286 + (vs + vo)))",
1363
1363
  eval: ((vs, vo) => (317.901286 + (vs + vo))),
1364
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (317.901286f + (vs + vo));\n}",
1365
- py: "import torch\n\ndef spear_fn(vs, vo):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (317.901286 + (vs + vo))",
1364
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (317.901286f + (vs + vo));\n}",
1365
+ py: "import torch\n\ndef spear_fn(vs, vo):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (317.901286 + (vs + vo))",
1366
1366
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAMCAQAHCQEFc3BlYXIAAAoTAREARHxl3qpr3nNAIAAgAaCgCw==",
1367
1367
  },
1368
1368
  meta: {
@@ -1379,15 +1379,15 @@ const kernels = {
1379
1379
  precise: {
1380
1380
  js: "((t) => (0.42 * (Math.max(0, t) * (t) * (t) * (t))))",
1381
1381
  eval: ((t) => (0.42 * (Math.max(0, t) * (t) * (t) * (t)))),
1382
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (0.42f * (fmaxf(0.0f, t) * powf(t, 3.0f)));\n}",
1383
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (0.42 * (torch.relu(t) * (t ** 3)))",
1382
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (0.42f * (fmaxf(0.0f, t) * powf(t, 3.0f)));\n}",
1383
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (0.42 * (torch.relu(t) * (t ** 3)))",
1384
1384
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACiMBIQBE4XoUrkfh2j8gAEQAAAAAAAAAAKUgACAAIACioqKiCw==",
1385
1385
  },
1386
1386
  fast: {
1387
1387
  js: "((t) => (t) * (t) * (t))",
1388
1388
  eval: ((t) => (t) * (t) * (t)),
1389
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf(t, 3.0f);\n}",
1390
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (t ** 3)",
1389
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf(t, 3.0f);\n}",
1390
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (t ** 3)",
1391
1391
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACgwBCgAgACAAIACiogs=",
1392
1392
  },
1393
1393
  meta: {
@@ -1404,15 +1404,15 @@ const kernels = {
1404
1404
  precise: {
1405
1405
  js: "((l, m) => (-Math.min(1e4, Math.max(-1e4, (Math.min(1e4, Math.max(-1e4, (l) / ((m) < 1e-4 && (m) > -1e-4 ? ((m) >= 0 ? 1e-4 : -1e-4) : (m))))) / (((l - m)) < 1e-4 && ((l - m)) > -1e-4 ? (((l - m)) >= 0 ? 1e-4 : -1e-4) : ((l - m)))))))",
1406
1406
  eval: ((l, m) => (-Math.min(1e4, Math.max(-1e4, (Math.min(1e4, Math.max(-1e4, (l) / ((m) < 1e-4 && (m) > -1e-4 ? ((m) >= 0 ? 1e-4 : -1e-4) : (m))))) / (((l - m)) < 1e-4 && ((l - m)) > -1e-4 ? (((l - m)) >= 0 ? 1e-4 : -1e-4) : ((l - m))))))),
1407
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (-fminf(fmaxf((fminf(fmaxf((l / copysignf(fmaxf(fabsf(m), 1.0e-4f), m)), -1.0e4f), 1.0e4f) / copysignf(fmaxf(fabsf((l - m)), 1.0e-4f), (l - m))), -1.0e4f), 1.0e4f));\n}",
1408
- py: "import torch\n\ndef spear_fn(l, m):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (-((l / (abs(m) < 1e-4 ? 1e-4 : m)) / (abs((l - m)) < 1e-4 ? 1e-4 : (l - m))))",
1407
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (-fminf(fmaxf((fminf(fmaxf((l / copysignf(fmaxf(fabsf(m), 1.0e-4f), m)), -1.0e4f), 1.0e4f) / copysignf(fmaxf(fabsf((l - m)), 1.0e-4f), (l - m))), -1.0e4f), 1.0e4f));\n}",
1408
+ py: "import torch\n\ndef spear_fn(l, m):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (-((l / (abs(m) < 1e-4 ? 1e-4 : m)) / (abs((l - m)) < 1e-4 ? 1e-4 : (l - m))))",
1409
1409
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAMCAQAHCQEFc3BlYXIAAApXAVUAIAAgAZlELUMc6+I2Gj+lIAGmo0QAAAAAAIjDwKVEAAAAAACIw0CkIAAgAaGZRC1DHOviNho/pSAAIAGhpqNEAAAAAACIw8ClRAAAAAAAiMNApJoL",
1410
1410
  },
1411
1411
  fast: {
1412
1412
  js: "((l, m) => Math.min(1e4, Math.max(-1e4, (-1.22881) / (((l - m)) < 1e-4 && ((l - m)) > -1e-4 ? (((l - m)) >= 0 ? 1e-4 : -1e-4) : ((l - m))))))",
1413
1413
  eval: ((l, m) => Math.min(1e4, Math.max(-1e4, (-1.22881) / (((l - m)) < 1e-4 && ((l - m)) > -1e-4 ? (((l - m)) >= 0 ? 1e-4 : -1e-4) : ((l - m)))))),
1414
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((-1.22881f / copysignf(fmaxf(fabsf((l - m)), 1.0e-4f), (l - m))), -1.0e4f), 1.0e4f);\n}",
1415
- py: "import torch\n\ndef spear_fn(l, m):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (-1.22881 / (abs((l - m)) < 1e-4 ? 1e-4 : (l - m)))",
1414
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fminf(fmaxf((-1.22881f / copysignf(fmaxf(fabsf((l - m)), 1.0e-4f), (l - m))), -1.0e4f), 1.0e4f);\n}",
1415
+ py: "import torch\n\ndef spear_fn(l, m):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (-1.22881 / (abs((l - m)) < 1e-4 ? 1e-4 : (l - m)))",
1416
1416
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAMCAQAHCQEFc3BlYXIAAAo4ATYARNP2r6w0qfO/IAAgAaGZRC1DHOviNho/pSAAIAGhpqNEAAAAAACIw8ClRAAAAAAAiMNApAs=",
1417
1417
  },
1418
1418
  meta: {
@@ -1429,8 +1429,8 @@ const kernels = {
1429
1429
  precise: {
1430
1430
  js: "((k) => ((-0.9084030522924049 * (Math.min(k, (Math.min(1e4, Math.max(-1e4, (1.924223) / ((k) < 1e-4 && (k) > -1e-4 ? ((k) >= 0 ? 1e-4 : -1e-4) : (k)))) + Math.min(1e4, Math.max(-1e4, (k) / ((k) < 1e-4 && (k) > -1e-4 ? ((k) >= 0 ? 1e-4 : -1e-4) : (k)))))) * -0.38734452474957204)) + 0.07435079907199241))",
1431
1431
  eval: ((k) => ((-0.9084030522924049 * (Math.min(k, (Math.min(1e4, Math.max(-1e4, (1.924223) / ((k) < 1e-4 && (k) > -1e-4 ? ((k) >= 0 ? 1e-4 : -1e-4) : (k)))) + Math.min(1e4, Math.max(-1e4, (k) / ((k) < 1e-4 && (k) > -1e-4 ? ((k) >= 0 ? 1e-4 : -1e-4) : (k)))))) * -0.38734452474957204)) + 0.07435079907199241)),
1432
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.908403f * (fminf(k, (fminf(fmaxf((1.924223f / copysignf(fmaxf(fabsf(k), 1.0e-4f), k)), -1.0e4f), 1.0e4f) + fminf(fmaxf((k / copysignf(fmaxf(fabsf(k), 1.0e-4f), k)), -1.0e4f), 1.0e4f))) * -0.387345f)) + 0.074351f);\n}",
1433
- py: "import torch\n\ndef spear_fn(k):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-0.908403 * (torch.minimum(k, ((1.924223 / (abs(k) < 1e-4 ? 1e-4 : k)) + (k / (abs(k) < 1e-4 ? 1e-4 : k)))) * -0.387345)) + 0.074351)",
1432
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.908403f * (fminf(k, (fminf(fmaxf((1.924223f / copysignf(fmaxf(fabsf(k), 1.0e-4f), k)), -1.0e4f), 1.0e4f) + fminf(fmaxf((k / copysignf(fmaxf(fabsf(k), 1.0e-4f), k)), -1.0e4f), 1.0e4f))) * -0.387345f)) + 0.074351f);\n}",
1433
+ py: "import torch\n\ndef spear_fn(k):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-0.908403 * (torch.minimum(k, ((1.924223 / (abs(k) < 1e-4 ? 1e-4 : k)) + (k / (abs(k) < 1e-4 ? 1e-4 : k)))) * -0.387345)) + 0.074351)",
1434
1434
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACnsBeQBEsNYlR6MR7b8gAERKYHMOnsn+PyAAmUQtQxzr4jYaP6UgAKajRAAAAAAAiMPApUQAAAAAAIjDQKQgACAAmUQtQxzr4jYaP6UgAKajRAAAAAAAiMPApUQAAAAAAIjDQKSgpER6YYWwQMrYv6KiRLoXcmqnCLM/oAs=",
1435
1435
  },
1436
1436
  meta: {
@@ -1447,8 +1447,8 @@ const kernels = {
1447
1447
  precise: {
1448
1448
  js: "((a, d, b, c) => (2 * Math.abs(((a * d) - (b * c)))))",
1449
1449
  eval: ((a, d, b, c) => (2 * Math.abs(((a * d) - (b * c))))),
1450
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (2f * fabsf(((a * d) - (b * c))));\n}",
1451
- py: "import torch\n\ndef spear_fn(a, d, b, c):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (2 * torch.abs(((a * d) - (b * c))))",
1450
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (2f * fabsf(((a * d) - (b * c))));\n}",
1451
+ py: "import torch\n\ndef spear_fn(a, d, b, c):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (2 * torch.abs(((a * d) - (b * c))))",
1452
1452
  wasmBase64: "AGFzbQEAAAABDgJgBHx8fHwBfGABfAF8AwIBAAcJAQVzcGVhcgAAChoBGABEAAAAAAAAAEAgACABoiACIAOioZmiCw==",
1453
1453
  },
1454
1454
  meta: {
@@ -1465,8 +1465,8 @@ const kernels = {
1465
1465
  precise: {
1466
1466
  js: "((a, b, ap, bp) => Math.abs((((-Math.cos((a - b))) + (-Math.cos((ap - b)))) - ((-Math.cos((a - bp))) - (-Math.cos((ap - bp)))))))",
1467
1467
  eval: ((a, b, ap, bp) => Math.abs((((-Math.cos((a - b))) + (-Math.cos((ap - b)))) - ((-Math.cos((a - bp))) - (-Math.cos((ap - bp))))))),
1468
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fabsf((((-cosf((a - b))) + (-cosf((ap - b)))) - ((-cosf((a - bp))) - (-cosf((ap - bp))))));\n}",
1469
- py: "import torch\n\ndef spear_fn(a, b, ap, bp):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.abs((((-torch.cos((a - b))) + (-torch.cos((ap - b)))) - ((-torch.cos((a - bp))) - (-torch.cos((ap - bp))))))",
1468
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return fabsf((((-cosf((a - b))) + (-cosf((ap - b)))) - ((-cosf((a - bp))) - (-cosf((ap - bp))))));\n}",
1469
+ py: "import torch\n\ndef spear_fn(a, b, ap, bp):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.abs((((-torch.cos((a - b))) + (-torch.cos((ap - b)))) - ((-torch.cos((a - bp))) - (-torch.cos((ap - bp))))))",
1470
1470
  wasmBase64: "AGFzbQEAAAABDgJgBHx8fHwBfGABfAF8AgsBA2VudgNjb3MAAQMCAQAHCQEFc3BlYXIAAQooASYAIAAgAaEQAJogAiABoRAAmqAgACADoRAAmiACIAOhEACaoaGZCw==",
1471
1471
  },
1472
1472
  meta: {
@@ -1483,15 +1483,15 @@ const kernels = {
1483
1483
  precise: {
1484
1484
  js: "((x) => ((1.5 * (x) * (x)) + -0.5))",
1485
1485
  eval: ((x) => ((1.5 * (x) * (x)) + -0.5)),
1486
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.5f * powf(x, 2.0f)) + -0.5f);\n}",
1487
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((1.5 * (x * x)) + -0.5)",
1486
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.5f * powf(x, 2.0f)) + -0.5f);\n}",
1487
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((1.5 * (x * x)) + -0.5)",
1488
1488
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACh0BGwBEAAAAAAAA+D8gACAAoqJEAAAAAAAA4L+gCw==",
1489
1489
  },
1490
1490
  fast: {
1491
1491
  js: "((x) => (-0.774693 * (x) * (x)))",
1492
1492
  eval: ((x) => (-0.774693 * (x) * (x))),
1493
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (-0.774693f * powf(x, 2.0f));\n}",
1494
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (-0.774693 * (x * x))",
1493
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (-0.774693f * powf(x, 2.0f));\n}",
1494
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (-0.774693 * (x * x))",
1495
1495
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAAChMBEQBEhxVu+UjK6L8gACAAoqIL",
1496
1496
  },
1497
1497
  meta: {
@@ -1508,15 +1508,15 @@ const kernels = {
1508
1508
  precise: {
1509
1509
  js: "((x) => ((0.25005568930581107 * ((-0.01236 + ((x + -1.996089)) * ((x + -1.996089))) + ((x + -2.005496)) * ((x + -2.005496)))) + -0.996477875101051))",
1510
1510
  eval: ((x) => ((0.25005568930581107 * ((-0.01236 + ((x + -1.996089)) * ((x + -1.996089))) + ((x + -2.005496)) * ((x + -2.005496)))) + -0.996477875101051)),
1511
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.250056f * ((-0.01236f + powf((x + -1.996089f), 2.0f)) + powf((x + -2.005496f), 2.0f))) + -0.996478f);\n}",
1512
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.250056 * ((-0.01236 + ((x + -1.996089) * (x + -1.996089))) + ((x + -2.005496) * (x + -2.005496)))) + -0.996478)",
1511
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.250056f * ((-0.01236f + powf((x + -1.996089f), 2.0f)) + powf((x + -2.005496f), 2.0f))) + -0.996478f);\n}",
1512
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.250056 * ((-0.01236 + ((x + -1.996089) * (x + -1.996089))) + ((x + -2.005496) * (x + -2.005496)))) + -0.996478)",
1513
1513
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAAClUBUwBEDdLvk+kA0D9Eqn06HjNQib8gAERKfO4E++//v6AgAERKfO4E++//v6CioCAARA4SonxBCwDAoCAARA4SonxBCwDAoKKgokQK5JeRJePvv6AL",
1514
1514
  },
1515
1515
  fast: {
1516
1516
  js: "((x) => (((x + -1.996089)) * ((x + -1.996089)) + -0.262804))",
1517
1517
  eval: ((x) => (((x + -1.996089)) * ((x + -1.996089)) + -0.262804)),
1518
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (powf((x + -1.996089f), 2.0f) + -0.262804f);\n}",
1519
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (((x + -1.996089) * (x + -1.996089)) + -0.262804)",
1518
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (powf((x + -1.996089f), 2.0f) + -0.262804f);\n}",
1519
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (((x + -1.996089) * (x + -1.996089)) + -0.262804)",
1520
1520
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACicBJQAgAERKfO4E++//v6AgAERKfO4E++//v6CiRM+CUN7H0dC/oAs=",
1521
1521
  },
1522
1522
  meta: {
@@ -1533,15 +1533,15 @@ const kernels = {
1533
1533
  precise: {
1534
1534
  js: "((x) => Math.asin(Math.max(-1, Math.min(1, x))))",
1535
1535
  eval: ((x) => Math.asin(Math.max(-1, Math.min(1, x)))),
1536
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return asinf(fmaxf(-1.0f, fminf(1.0f, x)));\n}",
1537
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.asin(torch.clamp(x, -1.0, 1.0))",
1536
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return asinf(fmaxf(-1.0f, fminf(1.0f, x)));\n}",
1537
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.asin(torch.clamp(x, -1.0, 1.0))",
1538
1538
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgwBA2VudgRhc2luAAEDAgEABwkBBXNwZWFyAAEKHAEaACAARAAAAAAAAPC/pUQAAAAAAADwP6QQAAs=",
1539
1539
  },
1540
1540
  fast: {
1541
1541
  js: "((x) => (0.529961 * ((1.930182 * x) + ((0.645691 * (x) * (x)) * (x) * (x) * (x)))))",
1542
1542
  eval: ((x) => (0.529961 * ((1.930182 * x) + ((0.645691 * (x) * (x)) * (x) * (x) * (x))))),
1543
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (0.529961f * ((1.930182f * x) + ((0.645691f * powf(x, 2.0f)) * powf(x, 3.0f))));\n}",
1544
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return (0.529961 * ((1.930182 * x) + ((0.645691 * (x * x)) * (x ** 3))))",
1543
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return (0.529961f * ((1.930182f * x) + ((0.645691f * powf(x, 2.0f)) * powf(x, 3.0f))));\n}",
1544
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return (0.529961 * ((1.930182 * x) + ((0.645691 * (x * x)) * (x ** 3))))",
1545
1545
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAACjMBMQBEf/lkxXD14D9E9z5VhQbi/j8gAKJEBkoKLICp5D8gACAAoqIgACAAIACioqKgogs=",
1546
1546
  },
1547
1547
  meta: {
@@ -1558,8 +1558,8 @@ const kernels = {
1558
1558
  precise: {
1559
1559
  js: "((n, t, g) => ((0.002631 * Math.min(1e4, Math.max(-1e4, (Math.sin(Math.log(Math.max(1e-30, n)))) / (((Math.min(1e4, Math.max(-1e4, (0.35138) / ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) < 1e-4 && (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) > -1e-4 ? ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) >= 0 ? 1e-4 : -1e-4) : (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g)))))))) * g)) < 1e-4 && ((Math.min(1e4, Math.max(-1e4, (0.35138) / ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) < 1e-4 && (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) > -1e-4 ? ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) >= 0 ? 1e-4 : -1e-4) : (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g)))))))) * g)) > -1e-4 ? (((Math.min(1e4, Math.max(-1e4, (0.35138) / ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) < 1e-4 && (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) > -1e-4 ? ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) >= 0 ? 1e-4 : -1e-4) : (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g)))))))) * g)) >= 0 ? 1e-4 : -1e-4) : ((Math.min(1e4, Math.max(-1e4, (0.35138) / ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) < 1e-4 && (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) > -1e-4 ? ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) >= 0 ? 1e-4 : -1e-4) : (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g)))))))) * g)))))) + 0.159052))",
1560
1560
  eval: ((n, t, g) => ((0.002631 * Math.min(1e4, Math.max(-1e4, (Math.sin(Math.log(Math.max(1e-30, n)))) / (((Math.min(1e4, Math.max(-1e4, (0.35138) / ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) < 1e-4 && (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) > -1e-4 ? ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) >= 0 ? 1e-4 : -1e-4) : (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g)))))))) * g)) < 1e-4 && ((Math.min(1e4, Math.max(-1e4, (0.35138) / ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) < 1e-4 && (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) > -1e-4 ? ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) >= 0 ? 1e-4 : -1e-4) : (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g)))))))) * g)) > -1e-4 ? (((Math.min(1e4, Math.max(-1e4, (0.35138) / ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) < 1e-4 && (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) > -1e-4 ? ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) >= 0 ? 1e-4 : -1e-4) : (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g)))))))) * g)) >= 0 ? 1e-4 : -1e-4) : ((Math.min(1e4, Math.max(-1e4, (0.35138) / ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) < 1e-4 && (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) > -1e-4 ? ((Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g))))) >= 0 ? 1e-4 : -1e-4) : (Math.min(1e4, Math.max(-1e4, (t) / ((g) < 1e-4 && (g) > -1e-4 ? ((g) >= 0 ? 1e-4 : -1e-4) : (g)))))))) * g)))))) + 0.159052)),
1561
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.002631f * fminf(fmaxf((sinf(logf(fmaxf(1.0e-30f, n))) / copysignf(fmaxf(fabsf((fminf(fmaxf((0.35138f / copysignf(fmaxf(fabsf(fminf(fmaxf((t / copysignf(fmaxf(fabsf(g), 1.0e-4f), g)), -1.0e4f), 1.0e4f)), 1.0e-4f), fminf(fmaxf((t / copysignf(fmaxf(fabsf(g), 1.0e-4f), g)), -1.0e4f), 1.0e4f))), -1.0e4f), 1.0e4f) * g)), 1.0e-4f), (fminf(fmaxf((0.35138f / copysignf(fmaxf(fabsf(fminf(fmaxf((t / copysignf(fmaxf(fabsf(g), 1.0e-4f), g)), -1.0e4f), 1.0e4f)), 1.0e-4f), fminf(fmaxf((t / copysignf(fmaxf(fabsf(g), 1.0e-4f), g)), -1.0e4f), 1.0e4f))), -1.0e4f), 1.0e4f) * g))), -1.0e4f), 1.0e4f)) + 0.159052f);\n}",
1562
- py: "import torch\n\ndef spear_fn(n, t, g):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.002631 * (torch.sin(torch.log(torch.clamp(n, min=1e-30))) / (abs(((0.35138 / (abs((t / (abs(g) < 1e-4 ? 1e-4 : g))) < 1e-4 ? 1e-4 : (t / (abs(g) < 1e-4 ? 1e-4 : g)))) * g)) < 1e-4 ? 1e-4 : ((0.35138 / (abs((t / (abs(g) < 1e-4 ? 1e-4 : g))) < 1e-4 ? 1e-4 : (t / (abs(g) < 1e-4 ? 1e-4 : g)))) * g)))) + 0.159052)",
1561
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.002631f * fminf(fmaxf((sinf(logf(fmaxf(1.0e-30f, n))) / copysignf(fmaxf(fabsf((fminf(fmaxf((0.35138f / copysignf(fmaxf(fabsf(fminf(fmaxf((t / copysignf(fmaxf(fabsf(g), 1.0e-4f), g)), -1.0e4f), 1.0e4f)), 1.0e-4f), fminf(fmaxf((t / copysignf(fmaxf(fabsf(g), 1.0e-4f), g)), -1.0e4f), 1.0e4f))), -1.0e4f), 1.0e4f) * g)), 1.0e-4f), (fminf(fmaxf((0.35138f / copysignf(fmaxf(fabsf(fminf(fmaxf((t / copysignf(fmaxf(fabsf(g), 1.0e-4f), g)), -1.0e4f), 1.0e4f)), 1.0e-4f), fminf(fmaxf((t / copysignf(fmaxf(fabsf(g), 1.0e-4f), g)), -1.0e4f), 1.0e4f))), -1.0e4f), 1.0e4f) * g))), -1.0e4f), 1.0e4f)) + 0.159052f);\n}",
1562
+ py: "import torch\n\ndef spear_fn(n, t, g):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.002631 * (torch.sin(torch.log(torch.clamp(n, min=1e-30))) / (abs(((0.35138 / (abs((t / (abs(g) < 1e-4 ? 1e-4 : g))) < 1e-4 ? 1e-4 : (t / (abs(g) < 1e-4 ? 1e-4 : g)))) * g)) < 1e-4 ? 1e-4 : ((0.35138 / (abs((t / (abs(g) < 1e-4 ? 1e-4 : g))) < 1e-4 ? 1e-4 : (t / (abs(g) < 1e-4 ? 1e-4 : g)))) * g)))) + 0.159052)",
1563
1563
  wasmBase64: "AGFzbQEAAAABDQJgA3x8fAF8YAF8AXwCFQIDZW52A3NpbgABA2VudgNsb2cAAQMCAQAHCQEFc3BlYXIAAgrAAgG9AgBEjbeVXpuNZT8gAESgwuv+S0i0OaUQARAARJT7HYoCfdY/IAEgAplELUMc6+I2Gj+lIAKmo0QAAAAAAIjDwKVEAAAAAACIw0CkmUQtQxzr4jYaP6UgASACmUQtQxzr4jYaP6UgAqajRAAAAAAAiMPApUQAAAAAAIjDQKSmo0QAAAAAAIjDwKVEAAAAAACIw0CkIAKimUQtQxzr4jYaP6VElPsdigJ91j8gASACmUQtQxzr4jYaP6UgAqajRAAAAAAAiMPApUQAAAAAAIjDQKSZRC1DHOviNho/pSABIAKZRC1DHOviNho/pSACpqNEAAAAAACIw8ClRAAAAAAAiMNApKajRAAAAAAAiMPApUQAAAAAAIjDQKQgAqKmo0QAAAAAAIjDwKVEAAAAAACIw0CkokShgy7h0FvEP6AL",
1564
1564
  },
1565
1565
  meta: {
@@ -1576,8 +1576,8 @@ const kernels = {
1576
1576
  precise: {
1577
1577
  js: "((th, t) => ((-2.161354036444073 * ((Math.cos(Math.sin(th)) - Math.cos(Math.cos(th))) * Math.sin(Math.sin(t)))) + 0.9986778255438645))",
1578
1578
  eval: ((th, t) => ((-2.161354036444073 * ((Math.cos(Math.sin(th)) - Math.cos(Math.cos(th))) * Math.sin(Math.sin(t)))) + 0.9986778255438645)),
1579
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-2.161354f * ((cosf(sinf(th)) - cosf(cosf(th))) * sinf(sinf(t)))) + 0.998678f);\n}",
1580
- py: "import torch\n\ndef spear_fn(th, t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-2.161354 * ((torch.cos(torch.sin(th)) - torch.cos(torch.cos(th))) * torch.sin(torch.sin(t)))) + 0.998678)",
1579
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-2.161354f * ((cosf(sinf(th)) - cosf(cosf(th))) * sinf(sinf(t)))) + 0.998678f);\n}",
1580
+ py: "import torch\n\ndef spear_fn(th, t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-2.161354 * ((torch.cos(torch.sin(th)) - torch.cos(torch.cos(th))) * torch.sin(torch.sin(t)))) + 0.998678)",
1581
1581
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAIVAgNlbnYDc2luAAEDZW52A2NvcwABAwIBAAcJAQVzcGVhcgACCiwBKgBEztYs/HNKAcAgABAAEAEgABABEAGhIAEQABAAoqJE+3D+Miv17z+gCw==",
1582
1582
  },
1583
1583
  meta: {
@@ -1594,15 +1594,15 @@ const kernels = {
1594
1594
  precise: {
1595
1595
  js: "((t) => ((3.2707335278466636 * (Math.min(Math.cos((t * 3.130638)), 3.047207) * Math.min(-0.185459, Math.cos((t * 3.047207))))) + 0.5942965371145621))",
1596
1596
  eval: ((t) => ((3.2707335278466636 * (Math.min(Math.cos((t * 3.130638)), 3.047207) * Math.min(-0.185459, Math.cos((t * 3.047207))))) + 0.5942965371145621)),
1597
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((3.270734f * (fminf(cosf((t * 3.130638f)), 3.047207f) * fminf(-0.185459f, cosf((t * 3.047207f))))) + 0.594297f);\n}",
1598
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((3.270734 * (torch.minimum(torch.cos((t * 3.130638)), 3.047207) * torch.minimum(-0.185459, torch.cos((t * 3.047207))))) + 0.594297)",
1597
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((3.270734f * (fminf(cosf((t * 3.130638f)), 3.047207f) * fminf(-0.185459f, cosf((t * 3.047207f))))) + 0.594297f);\n}",
1598
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((3.270734 * (torch.minimum(torch.cos((t * 3.130638)), 3.047207) * torch.minimum(-0.185459, torch.cos((t * 3.047207))))) + 0.594297)",
1599
1599
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNjb3MAAQMCAQAHCQEFc3BlYXIAAQpJAUcARMtBAFd2KgpAIABENeuM74sLCUCiEABEYCNJEK5gCECkRMfa39kevce/IABEYCNJEK5gCECiEACkoqJEHA/hK3oE4z+gCw==",
1600
1600
  },
1601
1601
  fast: {
1602
1602
  js: "((t) => ((-0.287877 + Math.cos((t * 3.057635)))) * ((-0.287877 + Math.cos((t * 3.057635)))) * ((-0.287877 + Math.cos((t * 3.057635)))))",
1603
1603
  eval: ((t) => ((-0.287877 + Math.cos((t * 3.057635)))) * ((-0.287877 + Math.cos((t * 3.057635)))) * ((-0.287877 + Math.cos((t * 3.057635))))),
1604
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf((-0.287877f + cosf((t * 3.057635f))), 3.0f);\n}",
1605
- py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-0.287877 + torch.cos((t * 3.057635))) ** 3)",
1604
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return powf((-0.287877f + cosf((t * 3.057635f))), 3.0f);\n}",
1605
+ py: "import torch\n\ndef spear_fn(t):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-0.287877 + torch.cos((t * 3.057635))) ** 3)",
1606
1606
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNjb3MAAQMCAQAHCQEFc3BlYXIAAQpOAUwARGFREaeTbNK/IABE9dbAVgl2CECiEACgRGFREaeTbNK/IABE9dbAVgl2CECiEACgRGFREaeTbNK/IABE9dbAVgl2CECiEACgoqIL",
1607
1607
  },
1608
1608
  meta: {
@@ -1619,8 +1619,8 @@ const kernels = {
1619
1619
  precise: {
1620
1620
  js: "((x) => ((-0.956621415374655 * Math.min(1e4, Math.max(-1e4, (x) / (((0.802245 + Math.abs(x))) < 1e-4 && ((0.802245 + Math.abs(x))) > -1e-4 ? (((0.802245 + Math.abs(x))) >= 0 ? 1e-4 : -1e-4) : ((0.802245 + Math.abs(x))))))) + 1.0055104538128088))",
1621
1621
  eval: ((x) => ((-0.956621415374655 * Math.min(1e4, Math.max(-1e4, (x) / (((0.802245 + Math.abs(x))) < 1e-4 && ((0.802245 + Math.abs(x))) > -1e-4 ? (((0.802245 + Math.abs(x))) >= 0 ? 1e-4 : -1e-4) : ((0.802245 + Math.abs(x))))))) + 1.0055104538128088)),
1622
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.956621f * fminf(fmaxf((x / copysignf(fmaxf(fabsf((0.802245f + fabsf(x))), 1.0e-4f), (0.802245f + fabsf(x)))), -1.0e4f), 1.0e4f)) + 1.00551f);\n}",
1623
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((-0.956621 * (x / (abs((0.802245 + torch.abs(x))) < 1e-4 ? 1e-4 : (0.802245 + torch.abs(x))))) + 1.00551)",
1622
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((-0.956621f * fminf(fmaxf((x / copysignf(fmaxf(fabsf((0.802245f + fabsf(x))), 1.0e-4f), (0.802245f + fabsf(x)))), -1.0e4f), 1.0e4f)) + 1.00551f);\n}",
1623
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((-0.956621 * (x / (abs((0.802245 + torch.abs(x))) < 1e-4 ? 1e-4 : (0.802245 + torch.abs(x))))) + 1.00551)",
1624
1624
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AwIBAAcJAQVzcGVhcgAAClUBUwBE+f61g6Sc7r8gAEQHJcy0/avpPyAAmaCZRC1DHOviNho/pUQHJcy0/avpPyAAmaCmo0QAAAAAAIjDwKVEAAAAAACIw0CkokQYmC4hkhbwP6AL",
1625
1625
  },
1626
1626
  meta: {
@@ -1637,8 +1637,8 @@ const kernels = {
1637
1637
  precise: {
1638
1638
  js: "((m) => ((0.22939144913554116 * ((Math.exp(Math.max(-50, Math.min(50, m))) * (Math.asin(Math.max(-1, Math.min(1, m)))) * (Math.asin(Math.max(-1, Math.min(1, m)))) * (Math.asin(Math.max(-1, Math.min(1, m))))) + m)) + 1.6428050203299513))",
1639
1639
  eval: ((m) => ((0.22939144913554116 * ((Math.exp(Math.max(-50, Math.min(50, m))) * (Math.asin(Math.max(-1, Math.min(1, m)))) * (Math.asin(Math.max(-1, Math.min(1, m)))) * (Math.asin(Math.max(-1, Math.min(1, m))))) + m)) + 1.6428050203299513)),
1640
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.229391f * ((expf(fmaxf(-50.0f, fminf(50.0f, m))) * powf(asinf(fmaxf(-1.0f, fminf(1.0f, m))), 3.0f)) + m)) + 1.642805f);\n}",
1641
- py: "import torch\n\ndef spear_fn(m):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((0.229391 * ((torch.exp(torch.clamp(m, -50.0, 50.0)) * (torch.asin(torch.clamp(m, -1.0, 1.0)) ** 3)) + m)) + 1.642805)",
1640
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((0.229391f * ((expf(fmaxf(-50.0f, fminf(50.0f, m))) * powf(asinf(fmaxf(-1.0f, fminf(1.0f, m))), 3.0f)) + m)) + 1.642805f);\n}",
1641
+ py: "import torch\n\ndef spear_fn(m):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((0.229391 * ((torch.exp(torch.clamp(m, -50.0, 50.0)) * (torch.asin(torch.clamp(m, -1.0, 1.0)) ** 3)) + m)) + 1.642805)",
1642
1642
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AhYCA2VudgNleHAAAQNlbnYEYXNpbgABAwIBAAcJAQVzcGVhcgACCn4BfABECnUC8rJczT8gAEQAAAAAAABJwKVEAAAAAAAASUCkEAAgAEQAAAAAAADwv6VEAAAAAAAA8D+kEAEgAEQAAAAAAADwv6VEAAAAAAAA8D+kEAEgAEQAAAAAAADwv6VEAAAAAAAA8D+kEAGioqIgAKCiRB1ZwOrtSPo/oAs=",
1643
1643
  },
1644
1644
  meta: {
@@ -1655,8 +1655,8 @@ const kernels = {
1655
1655
  precise: {
1656
1656
  js: "((e, M) => ((1.8991880781575727 * (Math.max(0, Math.log(Math.max(1e-30, (e + M)))) - 4.88761)) + 9.923214341619618))",
1657
1657
  eval: ((e, M) => ((1.8991880781575727 * (Math.max(0, Math.log(Math.max(1e-30, (e + M)))) - 4.88761)) + 9.923214341619618)),
1658
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.899188f * (fmaxf(0.0f, logf(fmaxf(1.0e-30f, (e + M)))) - 4.88761f)) + 9.923214f);\n}",
1659
- py: "import torch\n\ndef spear_fn(e, M):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return ((1.899188 * (torch.relu(torch.log(torch.clamp((e + M), min=1e-30))) - 4.88761)) + 9.923214)",
1658
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return ((1.899188f * (fmaxf(0.0f, logf(fmaxf(1.0e-30f, (e + M)))) - 4.88761f)) + 9.923214f);\n}",
1659
+ py: "import torch\n\ndef spear_fn(e, M):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return ((1.899188 * (torch.relu(torch.log(torch.clamp((e + M), min=1e-30))) - 4.88761)) + 9.923214)",
1660
1660
  wasmBase64: "AGFzbQEAAAABDAJgAnx8AXxgAXwBfAILAQNlbnYDbG9nAAEDAgEABwkBBXNwZWFyAAEKPQE7AETlPMoJE2P+PyAAIAGgRKDC6/5LSLQ5pRAARAAAAAAAAAAApUQFacai6YwTQKGiRKvo2Iyv2CNAoAs=",
1661
1661
  },
1662
1662
  meta: {
@@ -1673,8 +1673,8 @@ const kernels = {
1673
1673
  precise: {
1674
1674
  js: "((x) => Math.exp(Math.max(-50, Math.min(50, x))))",
1675
1675
  eval: ((x) => Math.exp(Math.max(-50, Math.min(50, x)))),
1676
- c: "// Evolved by SPEAR — algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return expf(fmaxf(-50.0f, fminf(50.0f, x)));\n}",
1677
- py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR — zero transcendental ops (exp/erf/tanh free)\n return torch.exp(torch.clamp(x, -50.0, 50.0))",
1676
+ c: "// Evolved by SPEAR algebraic only, FP16 safe\n__device__ inline float spear_fn(const float x) {\n return expf(fmaxf(-50.0f, fminf(50.0f, x)));\n}",
1677
+ py: "import torch\n\ndef spear_fn(x):\n # Evolved by SPEAR zero transcendental ops (exp/erf/tanh free)\n return torch.exp(torch.clamp(x, -50.0, 50.0))",
1678
1678
  wasmBase64: "AGFzbQEAAAABCwJgAXwBfGABfAF8AgsBA2VudgNleHAAAQMCAQAHCQEFc3BlYXIAAQocARoAIABEAAAAAAAAScClRAAAAAAAAElApBAACw==",
1679
1679
  },
1680
1680
  meta: {