# Constant Double only has a single floating point precision.

**URL:** <https://forums.unrealengine.com/t/constant-double-only-has-a-single-floating-point-precision/1333727>\
**Category:** Asset Creation\
**Tags:** bug, math-expression, unreal-engine, UE5, need-help, issue, shader, question\
**Created:** [October 15, 2023, 9:54pm UTC](https://forums.unrealengine.com/t/constant-double-only-has-a-single-floating-point-precision/1333727 "2023-10-15T21:54:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ibtesam\_Sadiq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ibtesam\_Sadiq](https://forums.unrealengine.com/u/Ibtesam_Sadiq)\
**Post date:** [October 15, 2023, 9:54pm UTC](https://forums.unrealengine.com/t/constant-double-only-has-a-single-floating-point-precision/1333727/1 "2023-10-15T21:54:23Z")

</div>

I am working in the material editor and using Unreal Engine 5.3. there are 2 constant nodes for a single value.  
the simple constant node that we used to have in the previous version.  
and new node Constant Double which I suppose should have a higher precision value than a single floating point.  
but both have the same single floating point precision so I don’t understand the point of two different nodes.

![Screenshot 2023-10-15 021713](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/8/e98cd1118a7fc16beb04f5299b121cfa1752453f.png)

 ![Screenshot 2023-10-16 024342](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/e/aced15b9d7c899c9283ec8a240a22930a5c004ae.png)

Note: I already know we have a function for radian to a degree so the example is only for test.  
here is an example.  
Constant Double (full\_Rotation\_Radian) = 6.28318530717958647692  
Constant Double (half\_Rotation\_Degree) = 180  
Constant Double (Pi) = 3.14159265358979323846

The answer in the material editor is incorrect:  
(half\_Rotation\_Degree / Pi) \* full\_Rotation\_Radian = 369.0002200 (incorrect value)

Correct Value using a calculator:  
(half\_Rotation\_Degree / Pi) \* full\_Rotation\_Radian = 360 (correct value)

If i break down the calculations.  
In material editor: 180 / pi = 57.295815 (incorrect value)

From calculator rounded value : 180 / pi = 57.29578 (correct value)  
It’s messing up values before even rounded digit.

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [October 15, 2023, 11:31pm UTC](https://forums.unrealengine.com/t/constant-double-only-has-a-single-floating-point-precision/1333727/2 "2023-10-15T23:31:34Z")

</div>

Hey there @Ibtesam_Sadiq! That’s a good question, since it seems the constants are all rounded to 6 digits in the decimal place, it doesn’t seem to matter if it’s a double or a float! It does seem like this might just be vestigial.

---

<div class="post-metadata">

**Author:** ![Ibtesam\_Sadiq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ibtesam\_Sadiq](https://forums.unrealengine.com/u/Ibtesam_Sadiq)\
**Post date:** [October 16, 2023, 3:08pm UTC](https://forums.unrealengine.com/t/constant-double-only-has-a-single-floating-point-precision/1333727/3 "2023-10-16T15:08:33Z")

</div>

I am wondering about the usecase for the double constant.  
it would be nice to have precise calculation inside material editor.
