# Transform Method to get inverseMatrix4 has a low precision!?

**URL:** <https://community.cesium.com/t/transform-method-to-get-inversematrix4-has-a-low-precision/4539>\
**Category:** CesiumJS\
**Created:** [August 25, 2016, 3:35am UTC](https://community.cesium.com/t/transform-method-to-get-inversematrix4-has-a-low-precision/4539 "2016-08-25T03:35:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lcp20140126](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@lcp20140126](https://community.cesium.com/u/lcp20140126)\
**Post date:** [August 25, 2016, 3:35am UTC](https://community.cesium.com/t/transform-method-to-get-inversematrix4-has-a-low-precision/4539/1 "2016-08-25T03:35:10Z")

</div>

Today,I use the method “Cesium.Matrix4.inverseTransformation” to get the inverse matrix,and use the method “Cesium.Matrix4.multiplyTransformation” to check the result,then I get the result below:  
[![](https://lh3.googleusercontent.com/-5Gp2QFZEzAQ/V75l_X5HotI/AAAAAAAAAAw/GTNMjKtx0wcAWmpyfB0dPTt5jxbZud0rACLcB/s320/Matrix4.png)](https://lh3.googleusercontent.com/-5Gp2QFZEzAQ/V75l_X5HotI/AAAAAAAAAAw/GTNMjKtx0wcAWmpyfB0dPTt5jxbZud0rACLcB/s1600/Matrix4.png)

m1 is a basic matrix4,and the m2 is the inverse matrix4,MM is the result of m1 multiply by m2,the accurate result must be identity matrix4.But in the picture,we can found it is a little different,Will it cause some problems?I really want to know it.

---

<div class="post-metadata">

**Author:** ![abdou](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/abdou/32/2012_2.png) [@abdou](https://community.cesium.com/u/abdou)\
**Post date:** [August 26, 2016, 5:07am UTC](https://community.cesium.com/t/transform-method-to-get-inversematrix4-has-a-low-precision/4539/2 "2016-08-26T05:07:51Z")

</div>

Hello,  
I think it’s due to limitations in [IEEE 754](https://en.wikipedia.org/wiki/Double-precision_floating-point_format)format ( **Double-precision floating-point format** ). It’s a compromise between speed execution and precision.  
For example, test these codes:

1. Math.cos(0.0000001)
2. Math.cos(0.00000001)

---

<div class="post-metadata">

**Author:** ![lcp20140126](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@lcp20140126](https://community.cesium.com/u/lcp20140126)\
**Post date:** [August 26, 2016, 6:40am UTC](https://community.cesium.com/t/transform-method-to-get-inversematrix4-has-a-low-precision/4539/3 "2016-08-26T06:40:18Z")

</div>

Thank you for your reply, I follow you to the code test,and found the difference.The compromise on the cesium would seem to cause some problems,like transforming the model from model frame to world frame.I don’t know how deep is the influence.

在 2016年8月26日星期五 UTC+8下午1:07:51，farouk abdou写道：
