Anonymous user
Numeric error propagation: Difference between revisions
m
→{{header|Kotlin}}: Fixed x2-y1-swap, c/f Java/Discussion
m (added a ;Related task: (bold) header.) |
m (→{{header|Kotlin}}: Fixed x2-y1-swap, c/f Java/Discussion) |
||
Line 1,138:
fun main(args: Array<String>) {
val x1 = Approx(100.0, 1.1)
val
val
val y2 = Approx(100.0, 2.3)
println(((x1 - x2).pow(2.0) + (y1 - y2).pow(2.0)).pow(0.5)) // => 111.80339887498948 ±2.938366893361004
}</lang>
{{out}}
<pre>111.80339887498948 ±2.
=={{header|Mathematica}}==
|