# \#integer

**URL:** https://discourse.julialang.org/tag/integer/1391.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Create \`BigInt\` directedly from MPZ pointer](https://discourse.julialang.org/t/create-bigint-directedly-from-mpz-pointer/138903)

<div class="topic-metadata">

**Author:** [@Chrysoberyl](https://discourse.julialang.org/u/Chrysoberyl)\
**Replies:** 6\
**Last updated:** [August 25, 2026, 5:52am UTC](https://discourse.julialang.org/t/create-bigint-directedly-from-mpz-pointer/138903 "2026-08-25T05:52:11Z")

</div>

I have some FFI code that interfaces with another library, and the target library has GNU multiprecision integers. Is it possible to create a BigInt directly from such a multiprecision integer pointer? The default constr…

---

## [On formatting the display of integer arrays](https://discourse.julialang.org/t/on-formatting-the-display-of-integer-arrays/132023)

<div class="topic-metadata">

**Author:** [@rcomm](https://discourse.julialang.org/u/rcomm)\
**Replies:** 6\
**Last updated:** [September 1, 2025, 5:48pm UTC](https://discourse.julialang.org/t/on-formatting-the-display-of-integer-arrays/132023 "2025-09-01T17:48:14Z")

</div>

I do combinatorial work which generates arrays containing small integers. Some arrays are large, so to reduce memory footprint all calculations are done in UInt8. Part of the analysis is to visually scan displays of se…

---

## [Type domain (static) integers](https://discourse.julialang.org/t/type-domain-static-integers/118568)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 28\
**Last updated:** [September 2, 2024, 4:41am UTC](https://discourse.julialang.org/t/type-domain-static-integers/118568 "2024-09-02T04:41:37Z")

</div>

I’m trying to get type domain integers into Base: Type domain integers are not a new idea, there was previously an effort by @Zach\_Christensen to get a StaticInt type into Base, and two relevant packages exist, Static…

---

## [Recommendations for solver and options to solve a MIQP, just looking for a feasible solution](https://discourse.julialang.org/t/recommendations-for-solver-and-options-to-solve-a-miqp-just-looking-for-a-feasible-solution/107024)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 5\
**Last updated:** [August 22, 2024, 10:03am UTC](https://discourse.julialang.org/t/recommendations-for-solver-and-options-to-solve-a-miqp-just-looking-for-a-feasible-solution/107024 "2024-08-22T10:03:24Z")

</div>

I formulated a mixed-integer quadratic program (MIQP) using MathOptInterface.jl to solve a problem for a student competition. It’s got some continuous variables that are the solution I’m looking for, and I also had to in…

---

## [Avogadro's number as a floating-point value](https://discourse.julialang.org/t/avogadros-number-as-a-floating-point-value/111379)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 18\
**Last updated:** [March 11, 2024, 2:10am UTC](https://discourse.julialang.org/t/avogadros-number-as-a-floating-point-value/111379 "2024-03-11T02:10:14Z")

</div>

Ok, on this topic: What on earth were the SI people thinking when they specced the current value of avogadro’s number? julia\> Int128(6.02214076e23) 602214075999999987023872 I get that they wanted to spec a nice round n…

---

## [Why doesn't \`x \< zero(x)\` for an unsigned integer lead to dead-code elimination?](https://discourse.julialang.org/t/why-doesnt-x-zero-x-for-an-unsigned-integer-lead-to-dead-code-elimination/103752)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 7\
**Last updated:** [September 13, 2023, 2:53pm UTC](https://discourse.julialang.org/t/why-doesnt-x-zero-x-for-an-unsigned-integer-lead-to-dead-code-elimination/103752 "2023-09-13T14:53:44Z")

</div>

julia\> isnegative(x) = x \< zero(x) isnegative (generic function with 1 method) julia\> @code\_typed isnegative(UInt(2)) CodeInfo( 1 ─ %1 = Base.ult\_int(x, 0x0000000000000000)::Bool └── return %1 ) =\> Bool I would ha…

---

## [Challenge: Can you beat Python and C++ in Int4 Matrix-Vector Multiply Op?](https://discourse.julialang.org/t/challenge-can-you-beat-python-and-c-in-int4-matrix-vector-multiply-op/101588)

<div class="topic-metadata">

**Author:** [@svilupp](https://discourse.julialang.org/u/svilupp)\
**Replies:** 10\
**Last updated:** [July 25, 2023, 9:44pm UTC](https://discourse.julialang.org/t/challenge-can-you-beat-python-and-c-in-int4-matrix-vector-multiply-op/101588 "2023-07-25T21:44:29Z")

</div>

TL;DR How close can we get to 4x speedup if we move from Float16 to Int4 in mat-vec multiply? Hi everyone, It’s challenge time! I’m calling on the Julia community to show Python bitsandbytes (recent release with 2-4x s…
