# Use ProgressMeter to track an increasing real value?

**URL:** <https://discourse.julialang.org/t/use-progressmeter-to-track-an-increasing-real-value/104361>\
**Category:** General Usage\
**Created:** [September 28, 2023, 5:58pm UTC](https://discourse.julialang.org/t/use-progressmeter-to-track-an-increasing-real-value/104361 "2023-09-28T17:58:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![benninkrs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benninkrs/32/3191_2.png) [@benninkrs](https://discourse.julialang.org/u/benninkrs)\
**Post date:** [September 28, 2023, 5:58pm UTC](https://discourse.julialang.org/t/use-progressmeter-to-track-an-increasing-real-value/104361/1 "2023-09-28T17:58:08Z")

</div>

I have a calculation which takes an unknown number of steps to increase a real value `x` from 0.0 to some user-specified target value `xmax > 0.0`. I want to use `ProgressMeter` to show the progress but none of progressmeter types seem applicable:

- `Progress` counts an integer number of steps up to some target `n`.
- `ProgressThresh` tracks the _decrease_ of a real value down to some target `xmin`.
- `ProgressUnknown` simply counts how many steps have been taken, with no target.

I can envision workarounds: For example, I could discretize the range [0, xmax] and use `Progress` to track the discretized value of `x`. Or, I could use `ProgressThresh` to track the decrease of `xmax - x`. However, both of these approaches seem clunky.

Is there a way to use `ProgressMeter` to directly show the progression of an increasing real value?

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [September 28, 2023, 6:32pm UTC](https://discourse.julialang.org/t/use-progressmeter-to-track-an-increasing-real-value/104361/2 "2023-09-28T18:32:17Z")

</div>

Show the decrease of `-x`?

---

<div class="post-metadata">

**Author:** ![benninkrs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benninkrs/32/3191_2.png) [@benninkrs](https://discourse.julialang.org/u/benninkrs)\
**Post date:** [September 28, 2023, 8:32pm UTC](https://discourse.julialang.org/t/use-progressmeter-to-track-an-increasing-real-value/104361/3 "2023-09-28T20:32:28Z")

</div>

That would be a workaround, similar to the second I proposed (though I am not sure `ProgressMeter` handles negative values). But the intent of my question is more whether there is an actual “track an increasing real value” mode that is not a workaround.
