Skip to content

Commit 92b68c5

Browse files
emekoiandrewrk
authored andcommitted
fix formatting
1 parent 8156a61 commit 92b68c5

File tree

1 file changed

+105
-27
lines changed

1 file changed

+105
-27
lines changed

std/special/c.zig

Lines changed: 105 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export fn bcmp(vl: [*]allowzero const u8, vr: [*]allowzero const u8, n: usize) i
146146
var index: usize = 0;
147147
while (index != n) : (index += 1) {
148148
if (vl[index] != vr[index]) {
149-
return 1;
149+
return 1;
150150
}
151151
}
152152

@@ -254,32 +254,110 @@ export fn fmod(x: f64, y: f64) f64 {
254254

255255
// TODO add intrinsics for these (and probably the double version too)
256256
// and have the math stuff use the intrinsic. same as @mod and @rem
257-
export fn floorf(x: f32) f32 {return math.floor(x);}
258-
export fn ceilf(x: f32) f32 {return math.ceil(x);}
259-
export fn floor(x: f64) f64 {return math.floor(x);}
260-
export fn ceil(x: f64) f64 {return math.ceil(x);}
261-
export fn fma(a: f64, b: f64, c: f64) f64 {return math.fma(f64, a, b, c);}
262-
export fn fmaf(a: f32, b: f32, c: f32) f32 {return math.fma(f32, a, b, c);}
263-
export fn sin(a: f64) f64 {return math.sin(a);}
264-
export fn sinf(a: f32) f32 {return math.sin(a);}
265-
export fn cos(a: f64) f64 {return math.cos(a);}
266-
export fn cosf(a: f32) f32 {return math.cos(a);}
267-
export fn exp(a: f64) f64 {return math.exp(a);}
268-
export fn expf(a: f32) f32 {return math.exp(a);}
269-
export fn exp2(a: f64) f64 {return math.exp2(a);}
270-
export fn exp2f(a: f32) f32 {return math.exp2(a);}
271-
export fn log(a: f64) f64 {return math.ln(a);}
272-
export fn logf(a: f32) f32 {return math.ln(a);}
273-
export fn log2(a: f64) f64 {return math.log2(a);}
274-
export fn log2f(a: f32) f32 {return math.log2(a);}
275-
export fn log10(a: f64) f64 {return math.log10(a);}
276-
export fn log10f(a: f32) f32 {return math.log10(a);}
277-
export fn fabs(a: f64) f64 {return math.fabs(a);}
278-
export fn fabsf(a: f32) f32 {return math.fabs(a);}
279-
export fn trunc(a: f64) f64 {return math.trunc(a);}
280-
export fn truncf(a: f32) f32 {return math.trunc(a);}
281-
export fn round(a: f64) f64 {return math.round(a);}
282-
export fn roundf(a: f32) f32 {return math.round(a);}
257+
export fn floorf(x: f32) f32 {
258+
return math.floor(x);
259+
}
260+
261+
export fn ceilf(x: f32) f32 {
262+
return math.ceil(x);
263+
}
264+
265+
export fn floor(x: f64) f64 {
266+
return math.floor(x);
267+
}
268+
269+
export fn ceil(x: f64) f64 {
270+
return math.ceil(x);
271+
}
272+
273+
export fn fma(a: f64, b: f64, c: f64) f64 {
274+
return math.fma(f64, a, b, c);
275+
}
276+
277+
export fn fmaf(a: f32, b: f32, c: f32) f32 {
278+
return math.fma(f32, a, b, c);
279+
}
280+
281+
export fn sin(a: f64) f64 {
282+
return math.sin(a);
283+
}
284+
285+
export fn sinf(a: f32) f32 {
286+
return math.sin(a);
287+
}
288+
289+
export fn cos(a: f64) f64 {
290+
return math.cos(a);
291+
}
292+
293+
export fn cosf(a: f32) f32 {
294+
return math.cos(a);
295+
}
296+
297+
export fn exp(a: f64) f64 {
298+
return math.exp(a);
299+
}
300+
301+
export fn expf(a: f32) f32 {
302+
return math.exp(a);
303+
}
304+
305+
export fn exp2(a: f64) f64 {
306+
return math.exp2(a);
307+
}
308+
309+
export fn exp2f(a: f32) f32 {
310+
return math.exp2(a);
311+
}
312+
313+
export fn log(a: f64) f64 {
314+
return math.ln(a);
315+
}
316+
317+
export fn logf(a: f32) f32 {
318+
return math.ln(a);
319+
}
320+
321+
export fn log2(a: f64) f64 {
322+
return math.log2(a);
323+
}
324+
325+
export fn log2f(a: f32) f32 {
326+
return math.log2(a);
327+
}
328+
329+
export fn log10(a: f64) f64 {
330+
return math.log10(a);
331+
}
332+
333+
export fn log10f(a: f32) f32 {
334+
return math.log10(a);
335+
}
336+
337+
export fn fabs(a: f64) f64 {
338+
return math.fabs(a);
339+
}
340+
341+
export fn fabsf(a: f32) f32 {
342+
return math.fabs(a);
343+
}
344+
345+
export fn trunc(a: f64) f64 {
346+
return math.trunc(a);
347+
}
348+
349+
export fn truncf(a: f32) f32 {
350+
return math.trunc(a);
351+
}
352+
353+
export fn round(a: f64) f64 {
354+
return math.round(a);
355+
}
356+
357+
export fn roundf(a: f32) f32 {
358+
return math.round(a);
359+
}
360+
283361
fn generic_fmod(comptime T: type, x: T, y: T) T {
284362
@setRuntimeSafety(false);
285363

0 commit comments

Comments
 (0)