# Does Processing Understand Scientific Notation?

**URL:** https://discourse.processing.org/t/does-processing-understand-scientific-notation/969
**Category:** Beginners
**Created:** [June 14, 2018, 6:22pm UTC](https://discourse.processing.org/t/does-processing-understand-scientific-notation/969 "2018-06-14T18:22:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![xxxlaf](https://avatars.discourse-cdn.com/v4/letter/x/ecc23a/32.png) [@xxxlaf](https://discourse.processing.org/u/xxxlaf)
#### Post date: [June 14, 2018, 6:22pm UTC](https://discourse.processing.org/t/does-processing-understand-scientific-notation/969/1 "2018-06-14T18:22:52Z")

</div>

Does processing know that when I type 6.673e-11 as a float it should come out 0.00000000006673 ?

Thanks.

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [June 14, 2018, 7:02pm UTC](https://discourse.processing.org/t/does-processing-understand-scientific-notation/969/2 "2018-06-14T19:02:02Z")

</div>

Within “.pde” files, any literal w/ a dot `.` or an `e` in it is treated as a `float` primitive datatype: 🧐  
[https://Processing.org/reference/float.html](https://Processing.org/reference/float.html)  
If you wish for a `double` instead, suffix them all w/ a `d`: `6.673e-11d` 👨‍🎓  
[https://Processing.org/reference/double.html](https://Processing.org/reference/double.html)

---

<div class="post-metadata">

### Author: ![Kevin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kevin/32/2297_2.png) [@Kevin](https://discourse.processing.org/u/Kevin)
#### Post date: [June 14, 2018, 7:08pm UTC](https://discourse.processing.org/t/does-processing-understand-scientific-notation/969/3 "2018-06-14T19:08:44Z")

</div>

The best way to answer questions like this is to just put together a little example program that tests it out:

```
float x = 6.673e-11;
float y = 0.00000000006673;
println(x == y);

```

This prints out `true`. But be mindful of floating point accuracy.
