# Array does not store correct values

**URL:** https://community.freefem.org/t/array-does-not-store-correct-values/1155
**Category:** General Discussion
**Created:** [August 13, 2021, 8:07am UTC](https://community.freefem.org/t/array-does-not-store-correct-values/1155 "2021-08-13T08:07:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![distractor](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@distractor](https://community.freefem.org/u/distractor)
#### Post date: [August 13, 2021, 8:07am UTC](https://community.freefem.org/t/array-does-not-store-correct-values/1155/1 "2021-08-13T08:07:41Z")

</div>

Could somebody please explain why

```auto
        real[int, int] IDeviatoric = [[2/3, -1/3, -1/3, 0, 0, 0],
                                    [-1/3, 2/3, -1/3, 0, 0, 0],
                                    [-1/3, -1/3, 2/3, 0, 0, 0],
                                    [0, 0, 0, 1, 0, 0],
                                    [0, 0, 0, 0, 1, 0],
                                    [0, 0, 0, 0, 0, 1]];
        cout << IDeviatoric << endl;

```

prints out

```auto
           0 0 0 0 0 0
           0 0 0 0 0 0
           0 0 0 0 0 0
           0 0 0 1 0 0
           0 0 0 0 1 0
           0 0 0 0 0 1

```

What happened with all the elements divided by 3? Jesus chirst …

---

<div class="post-metadata">

### Author: ![julienG](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/julieng/32/222_2.png) [@julienG](https://community.freefem.org/u/julienG)
#### Post date: [August 13, 2021, 8:13am UTC](https://community.freefem.org/t/array-does-not-store-correct-values/1155/2 "2021-08-13T08:13:27Z")

</div>

Probably `2/3` is understood as an integer: `2/3 = int(2/3)`  
Did you try to replace `2/3` by `2./3.` ?

---

<div class="post-metadata">

### Author: ![distractor](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@distractor](https://community.freefem.org/u/distractor)
#### Post date: [August 13, 2021, 8:15am UTC](https://community.freefem.org/t/array-does-not-store-correct-values/1155/3 "2021-08-13T08:15:33Z")

</div>

> [@julienG](#):
>
> Probably `2/3` is understood as an integer: `2/3 = int(2/3)`  
> Did you try to replace `2/3` by `2./3.` ?

Oh ok, replacing the `2/3` by `2./3.` works better, yes. Thanks! I was just about to hit something.
