mirror of
https://codeberg.org/ziglings/exercises.git
synced 2024-12-26 09:30:31 +00:00
Compare commits
No commits in common. "02bd0b20224302f315f6e4c969fbecdfbe2852e6" and "33d61cb3c9a0d7572937dea875037f0a1e817939" have entirely different histories.
02bd0b2022
...
33d61cb3c9
4 changed files with 4 additions and 5 deletions
|
@ -232,7 +232,6 @@ Zig Core Language
|
||||||
* [X] Working with C
|
* [X] Working with C
|
||||||
* [X] Threading
|
* [X] Threading
|
||||||
* [x] Labeled switch
|
* [x] Labeled switch
|
||||||
* [x] Vector operations (SIMD)
|
|
||||||
|
|
||||||
Zig Standard Library
|
Zig Standard Library
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ pub fn main() void {
|
||||||
// If e1 and e2 are valid pointers to elephants,
|
// If e1 and e2 are valid pointers to elephants,
|
||||||
// this function links the elephants so that e1's tail "points" to e2.
|
// this function links the elephants so that e1's tail "points" to e2.
|
||||||
fn linkElephants(e1: ?*Elephant, e2: ?*Elephant) void {
|
fn linkElephants(e1: ?*Elephant, e2: ?*Elephant) void {
|
||||||
e1.?.tail = e2.?;
|
e1.?.*.tail = e2.?;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function visits all elephants once, starting with the
|
// This function visits all elephants once, starting with the
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
// in practice. Because either you don't need the precision, or you use a
|
// in practice. Because either you don't need the precision, or you use a
|
||||||
// calculator in which the number is stored as a very precise constant.
|
// calculator in which the number is stored as a very precise constant.
|
||||||
// But at some point this constant was calculated and we are doing the same
|
// But at some point this constant was calculated and we are doing the same
|
||||||
// now. The question at this point is, how many partial values do we have
|
// now.The question at this point is, how many partial values do we have
|
||||||
// to calculate for which accuracy?
|
// to calculate for which accuracy?
|
||||||
//
|
//
|
||||||
// The answer is chewing, to get 8 digits after the decimal point we need
|
// The answer is chewing, to get 8 digits after the decimal point we need
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--- exercises/046_optionals2.zig 2024-11-08 22:46:25.592875338 +0100
|
--- exercises/046_optionals2.zig 2024-09-04 20:51:36.766783971 +0200
|
||||||
+++ answers/046_optionals2.zig 2024-11-08 22:46:20.699447951 +0100
|
+++ answers/046_optionals2.zig 2024-09-04 20:51:01.389400985 +0200
|
||||||
@@ -22,7 +22,7 @@
|
@@ -22,7 +22,7 @@
|
||||||
|
|
||||||
const Elephant = struct {
|
const Elephant = struct {
|
||||||
|
|
Loading…
Reference in a new issue