formal-methods-mpi / Workshop.jl

https://formal-methods-mpi.github.io/Workshop.jl/
Creative Commons Zero v1.0 Universal
1 stars 1 forks source link

±(value, error) - what is going on here? #96

Closed MalikaIhle closed 1 year ago

MalikaIhle commented 1 year ago

https://formal-methods-mpi.github.io/Workshop.jl/stable/3_types/exercise/

I do not understand the instructions of the exercice at all:

Define the function ±(value, error) to create a new instance of the Measurement type, and create some measurements.

why does the solution ±(val, err) = Measurement(val, err)

I can see m1 = 2.98 ± 0.43 creates Measurement(2.98, 0.43)

overall I'm quite confused with this exercice

Maximilian-Stefan-Ernst commented 1 year ago

I added an explanation about infix operators to the exercise... I hope this is now better.