# Rules for Arithmetic Assignment and NAT1305

**URL:** <https://techcommunity.softwareag.com/t/rules-for-arithmetic-assignment-and-nat1305/79647>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Linux\
**Created:** [December 1, 2008, 3:00pm UTC](https://techcommunity.softwareag.com/t/rules-for-arithmetic-assignment-and-nat1305/79647 "2008-12-01T15:00:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthias1](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Matthias1](https://techcommunity.softwareag.com/u/Matthias1)\
**Post date:** [December 1, 2008, 3:00pm UTC](https://techcommunity.softwareag.com/t/rules-for-arithmetic-assignment-and-nat1305/79647/1 "2008-12-01T15:00:44Z")

</div>

Hello all!

Here’s a sample code:

```auto
define data local
1 #f8 (F8)
1 #p20_5 (p20.5) init <100000>
1 #two_p (P20.5) init <2>
1 #two_f (f8) init <2>
end-define
*
reset #f8
#f8 := #f8 + #p20_5 ** 2 /* NAT1305
*
reset #f8
#f8 := #f8 + #p20_5 ** #two_p /* NAT1305
*
reset #f8
#f8 := #f8 + #p20_5 ** #two_f /* OK
*
reset #f8
#f8 := #f8 + #p20_5 * #p20_5 /* OK
*
#f8 := #p20_5 ** 2 /* OK
*
end
```

Since I read Natural’s documentation about “Precision of Results for Arithmetic Operations” (see [http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat634win/pg/pg\_furth\_arithm.htm#AO\_Prec\_Results](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat634win/pg/pg_furth_arithm.htm#AO_Prec_Results) ), I understand the NAT1305 of the first two COMPUTE-Statements. But then, I don’t unterstand why the last two COMPUTE-Statements are OK. Any Ideas?

Thanks,

Matthias

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:51pm UTC](https://techcommunity.softwareag.com/t/rules-for-arithmetic-assignment-and-nat1305/79647/2 "2021-04-02T14:51:14Z")

</div>


