# Nf() issue with decimal point

**URL:** <https://discourse.processing.org/t/nf-issue-with-decimal-point/4125>\
**Category:** Coding Questions\
**Created:** [October 4, 2018, 12:49pm UTC](https://discourse.processing.org/t/nf-issue-with-decimal-point/4125 "2018-10-04T12:49:31Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [October 15, 2018, 10:46am UTC](https://discourse.processing.org/t/nf-issue-with-decimal-point/4125/15 "2018-10-15T10:46:51Z")

</div>

One more script you could try with your old / clean settings (which hopefully might show something unexpected) -

```auto
import java.util.Locale;

float f = 1.23;
String s = nf(f, 0, 1);
println(s); // Prints "1,2"
println(Locale.getDefault());
println(Locale.getDefault(Locale.Category.DISPLAY));
println(Locale.getDefault(Locale.Category.FORMAT));

```

It is the value of the last line that _should_ be affecting the output.

---

_[View the full topic](https://discourse.processing.org/t/nf-issue-with-decimal-point/4125)._
