# Function return notation.

**URL:** <https://forum.kx.com/t/function-return-notation/13496>\
**Category:** Community Support\
**Tags:** imported, kdb-and-q\
**Created:** [March 17, 2022, 12:00am UTC](https://forum.kx.com/t/function-return-notation/13496 "2022-03-17T00:00:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ptech127](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@ptech127](https://forum.kx.com/u/ptech127)\
**Post date:** [March 17, 2022, 12:00am UTC](https://forum.kx.com/t/function-return-notation/13496/1 "2022-03-17T00:00:00Z")

</div>

[https://learninghub.kx.com/forums/topic/function-return-notation](https://learninghub.kx.com/forums/topic/function-return-notation)

Why does addition return 0w?

Why does multiplication return 0n?

---

<div class="post-metadata">

**Author:** ![lkerr2](https://sea2.discourse-cdn.com/flex002/user_avatar/forum.kx.com/lkerr2/32/57_2.png) [@lkerr2](https://forum.kx.com/u/lkerr2)\
**Post date:** [March 18, 2022, 12:00am UTC](https://forum.kx.com/t/function-return-notation/13496/2 "2022-03-18T00:00:00Z")

</div>

Two expressions: one multiplies `0+0` by `1%0&0`; the other adds them.

The sum of two long zeros is long zero.

`1%0` is float infinity `0w`. The type of the right argument does not matter; Divide always returns a float.

So the comparison is between `0*0w` and `0+0w`.

The latter is `0w`. Surely expected: infinity plus `x` is infinity.

The unexpected result then is `00w`_. Is not `0`_`x` always zero? But here its a float null `0n`. I do not know the mathematical justification for this; perhaps someone else can shed light?

BTW your lambdas could be simpler:

```
test1:{(x+y)*1%x&y} 
test2:{(x+y)+1%x&y}
```

&nbsp;

&nbsp;

&nbsp;

&nbsp;
