# 1 + 'a' = 'b'

**URL:** <https://discourse.julialang.org/t/1-a-b/77947>\
**Category:** General Usage\
**Created:** [March 16, 2022, 5:52am UTC](https://discourse.julialang.org/t/1-a-b/77947 "2022-03-16T05:52:33Z")\
**Posts on this page:** 2\
**Page:** 5

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [March 16, 2022, 9:02pm UTC](https://discourse.julialang.org/t/1-a-b/77947/83 "2022-03-16T21:02:33Z")

</div>

For floats there are at least two such operations available.

```julia
julia> +(f::AbstractFloat, i::Integer) = Base.add_sum(f, convert(typeof(f), i));
julia> 3.0 + 1
4.0

julia> +(f::AbstractFloat, i::Integer) = nextfloat(f, i);
julia> 3.0 + 1
3.0000000000000004

```

These could be disambiguated with

```julia
3.0 + AdditiveNumber(1) == 4.0
3.0 + SequentialNumber(1) == 3.0000000000000004

```

---

<div class="post-metadata">

**Author:** ![jonas-schulze](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonas-schulze/32/9228_2.png) [@jonas-schulze](https://discourse.julialang.org/u/jonas-schulze)\
**Post date:** [March 17, 2022, 11:48am UTC](https://discourse.julialang.org/t/1-a-b/77947/84 "2022-03-17T11:48:39Z")

</div>

I completely agree, and this is exactly why I appreciate `'a' + 1`.

[Previous page](https://discourse.julialang.org/t/1-a-b/77947.md?page=4)
