Commit 25dfd2b2 authored by Alberto Ramos's avatar Alberto Ramos

Small changes in I/O and data type management

parent dc4806fc
......@@ -36,6 +36,9 @@ println("a has error: ", err(a))
```
"""
function err(a::uwreal)
if (length(a.prop) == 0)
return 0.0
end
if (length(a.cfd) == 0)
error("No error available... maybe run uwerr")
end
......
......@@ -108,3 +108,7 @@ function Base.show(io::IO, a::uwreal)
print(io, a.mean, " (Error not available... maybe run uwerr)")
end
end
Base.zero(u::uwreal) = uwreal(0.0)
Base.one(u::uwreal) = uwreal(1.0)
Base.one(u::Type{uwreal}) = uwreal(1.0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment