mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: fix remaining errors. hello world now compiles
This commit is contained in:
@ -6,7 +6,7 @@ module math
|
||||
// with the sign bit of f and the result in the same bit position.
|
||||
// f32_bits(f32_from_bits(x)) == x.
|
||||
pub fn f32_bits(f f32) u32 {
|
||||
p := *u32(&f)
|
||||
p := &u32(&f)
|
||||
return *p
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ pub fn f32_bits(f f32) u32 {
|
||||
// and the result in the same bit position.
|
||||
// f32_from_bits(f32_bits(x)) == x.
|
||||
pub fn f32_from_bits(b u32) f32 {
|
||||
p := *f32(&b)
|
||||
p := &f32(&b)
|
||||
return *p
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ pub fn f32_from_bits(b u32) f32 {
|
||||
// with the sign bit of f and the result in the same bit position,
|
||||
// and f64_bits(f64_from_bits(x)) == x.
|
||||
pub fn f64_bits(f f64) u64 {
|
||||
p := *u64(&f)
|
||||
p := &u64(&f)
|
||||
return *p
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ pub fn f64_bits(f f64) u64 {
|
||||
// and the result in the same bit position.
|
||||
// f64_from_bits(f64_bits(x)) == x.
|
||||
pub fn f64_from_bits(b u64) f64 {
|
||||
p := *f64(&b)
|
||||
p := &f64(&b)
|
||||
return *p
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user