## Wednesday, October 28, 2015

### Finally, you can run Einstein Equations with CalcRx

This post assumes that you have the basic idea of C#, LINQ, and Reactive Extensions; and you have read the previous article in this series. You can suggest edits to this post here.

## Abstract

This is the second and the last post with regards to Einstein Equation Fix. In the last post, we identified a major issue on how LINQ syntax was incorrectly generated by CalcRx and how we fixed that. But there was still one glitch that was causing the Einstein equations to fail. A fix is finally applied and now we can run Lorentz Transformations or similar equations. This post discusses the fix.

## The issue

As you might recall from the previous post, we were still not able to run any of Einstein's relativity equations because of the way the bug was still there when functions were involved. To understand the issue better, consider the following expression.
1/sqrt(4)
I have left out the 'self' reference or the underscore for the sake of simplicity. The above will generate an Expression like this
__main.Select(a0 => fnsqrt(4)).CombineLatest(__main, (a,b) => 1/a);
Which is basically saying, transform the observable to yield square root of 4, then combine it with target observable again and do the division.
The above example would look pretty if CalcRx generated the following expression
__main.Select(a0 => 1/fnsqrt(4));
The last fix was not taking functions into account. Since in computer programming world square roots are done through functions, most of Einstein's Relativity equations that involve square roots would fail.
For instance, this time dilation equation
t=to1(v/c)2)

## The fix

The fix this time was easier, or at least we knew what it was. The fix was same but we just have to apply that to functions.
So now finally you can write Einstein Equations in expressions like so
// Length Contraction
var transformedLength = CalcRx.Evaluate<Measurement, double>("Length/(1 - sqrt(Velocity/299792458)^2)", functions);

## Conclusion

No math expression library would do justice if it could not function on any kind of expressions. Specially the Einstein's equations. Good thing the issue is resolved.

#### 1 comment:

1. khasiat dari obat tersebut bisa memberikan manfaat pada pasutri yang ingin mendapatkan kepuasan dalam bercinta agar kedua pasangan semakin harmonis ketika bercinta. bagi anda yang ingin mendapatkan viagra asli bisa anda beli diberbagai tempat asal sudah terbukti dengan keaslian produk dengan cara mengenali viagra usa asli pfizer 100 mg langsung dari berbagai situs yang sudah terpercaya atau dari refrensi teman yang sudah menggunakan viagra asli usa pfizer 100 mg silahkan anda berkunjung kesitus resmi agen yang ada diindonesia dan yang secara resmi menjadi agen distributor viagra asli usa 100 mg sejak tahun 1995 sampai sekarang. klik disini . selanjutnya ada produk dari amerika lainnya yang sangat terkenal baru-baru ini yaitu vimax asli berkhasiat untuk ereksi dan untuk memperbesar alat vital pria secara permanen berguna untuk memaksimalkan kepuasan saat diranjang.