CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 15:40:09 GMT
content-type: text/html; charset=utf-8
content-encoding: gzip
cf-ray: 965d3bcec81cc1d2-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=13af0113-e781-4a0d-bea9-8c68b8142617; expires=Mon, 27 Jul 2026 15:40:09 GMT; domain=.stackexchange.com; path=/; secure; httponly
set-cookie: prov=13af0113-e781-4a0d-bea9-8c68b8142617; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=m0Ni..F9YKzpHFeo_tOcw90CvUe_3iTdupPnTxATjKc-1753630809-1.0.1.1-JaWEMaKgidxhQQl_TffYJuWxeOxfQ82Cb2NNynAjVO6.hqrGDRiiFCKsXQceG2BoExy8EwL9s_P_vkuEuNtSACqeN6eKVU264OnV60QjeOw; path=/; expires=Sun, 27-Jul-25 16:10:09 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=rrKx07gP0yb8qjX9Pw37Z_OwJyw2kytQrjdx59qU5Nc-1753630809965-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: 2f1ce129-2af2-46ae-8934-03e9732654c1
x-worker-origin-response-time: 540000000
x-dns-prefetch-control: off
server: cloudflare
Newest 'mathematics' Questions - Code Review Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [mathematics]
For code that aims to solve problems in all branches of mathematics. (Please do NOT use this tag for incidental trivial use of arithmetic. A simple test to apply is: would an amateur or professional mathematician take an interest in the question?)
646 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
3
answers
147
views
Calculating volume expressions of \$n\$ -dimensional balls in Java - follow-up 2
(See the previous iteration.)
This time, I have refactored my code a bit. It follows immediately:
Code
...
4
votes
2
answers
200
views
Calculating volume expressions of n -dimensional balls in Java - follow-up
Intro
(The previous/initial iteration is there.)
(The next iteration is there.)
This time, I have incorporated a nice answer by Martin R.
Updated code
...
4
votes
1
answer
304
views
Calculating volume expressions of \$n\$-dimensional balls in Java
(See the next iteration.)
Intro
This time I have a Java program that prints some expression denoting the volumes of \$n\$-dimensional balls. All the math behind this is there.
Code
...
5
votes
1
answer
328
views
Multiplying two large numbers whose digits you have in a string, in AEC compiled to WebAssembly
You can see it live here: https://flatassembler.github.io/multiplying-strings-aec.html
...
2
votes
0
answers
21
views
Mathematica implementation of Welch method for constructing Costas arrays
I ported C++ implementation of Welch method for constructing Costas arrays to Mathematica.
Any feedback would be appreciated.
...
6
votes
2
answers
429
views
(Codewars) Goldbach's Conjecture (by @rsalgado) in Ruby
Link to kata: linkRank: 6 kyuKata author: @rsalgado
I have been recently learning Ruby-lang and have been attempting to solve the following kata from Codewars involving Goldbach's Conjecture:
...
5
votes
2
answers
824
views
Bruteforce integer multiplication in Java
Intro
This time, I have attempted to prove the following bruteforce multiplication formula:
$$
(a_n \cdots a_0) \cdot (b_m \cdots b_0) = \sum_{i = 0}^n \sum_{j = 0}^m a_i b_j \cdot 10^{i + j},
$$
...
2
votes
0
answers
147
views
How to make this arbitrary precision π calculator using Machin-like formula run faster?
Two days ago (or yesterday depending on your timezone) was π-day. So I thought it was a good day to calculate π.
I used Machin-like formula to calculate π, in homage of William Shanks, who calculated ...
-5
votes
1
answer
354
views
int128 handling in C code, gcc / glibc / linux - follow up IV [closed]
[edit] Hint: a similar project for C++20 which - as far as I see - also manages bigger than 128-bit integers can be found at: Infinite precision integer in C++20 . [/edit]
I got lots of kind hints on ...
7
votes
2
answers
249
views
Two-Step Linear Equation Solver with Input Validation and Formatting
This code defines a function to solve two-step linear equations of the form coefficient * variable + constant = solution. It prompts the user for the coefficient, ...
10
votes
3
answers
1k
views
Computing π(x): the combinatorial method
This is my C++ implementation of Computing π(x): the combinatorial method by Tomás Oliveira e Silva. The math involved is elementary number theory, but fiddly and not the focus here. I have ...
4
votes
2
answers
122
views
Polynomial.java - multiplication algorithms: naïve, Karatsuba, FFT
Intro
This post is a supplement to Polynomial.java - a Java class for dealing with polynomials with BigDecimal coefficients. It presents the three polynomial multiplication algorithms. Given two ...
7
votes
3
answers
732
views
Polynomial.java - a Java class for dealing with polynomials with BigDecimal coefficients
(You can find multiplication algorithms in Polynomial.java - multiplication algorithms: naïve, Karatsuba, FFT.)
Intro
This post presents the main class (Polynomial) ...
5
votes
2
answers
749
views
Polynomial.java - A tiny Java library for dealing with polynomials with double coefficients
Intro
This time, I have produced Polynomial.java. It is a simple polynomial class that stores its coefficients as double values in an array.
Code
...
7
votes
1
answer
885
views
`BigInt` implementation in C++23
Cooked this up in 3 days because I was bored and thought this would be an interesting project to work on. This BigInt implementation does what you'd expect it to do,...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
python × 205
performance × 136
algorithm × 109
c++ × 98
java × 95
python-3.x × 74
beginner × 67
c × 54
c# × 51
javascript × 42
time-limit-exceeded × 37
matrix × 32
numerical-methods × 22
primes × 22
integer × 21
numpy × 20
optimization × 19
haskell × 17
recursion × 15
floating-point × 14
combinatorics × 13
ruby × 13
comparative-review × 12
more related tags
Hot Network Questions
- spots / stains on tubeless tire
- Still learning electronics, can you explain this voltage protector failure?
- Can expanding foam provide interior strength for a large model?
- How to make that the object sliding down along the local axis while following the rotation of the another object?
- Symbols for A.P. Morse's book in Set Theory
- Moving multiplying cells away
- Rec Letter from Professor (who I haven't done research with) or from Work Supervisor
- Is there such a thing as 'aerospace grade software'?
- Balancing a Holy Water Bomb
- Can a minor run a business by having an adult act on their behalf?
- About Harp Pedaling for a Pentatonic Glissando
- Is it possible to use the PC power button to pre-select the OS in rEFInd UEFI dual boot setup?
- Existence of Jordan curves between a compact and an open set
- A national poll of 1000 French returns 25% of "Yes". Is it enough to say that it's quite impossible locally to be 0%, if we don't know the variance?
- How many simple groups are there of a given infinite cardinality?
- In Fantastic Four 2025 shouldn't this thing have taken years?
- how is it possible for a player to have crossed 2400 and secure 3+ IM norms to stay FM
- What's the difference between an eVisa and ETA travel authorization?
- Why aren't there baleen whales at about the size of a dolphin?
- Sci-fi book where aliens make contact, ask humans to transport themselves to nearby portal
- I don't have enough alive employees to start the day. What now?
- Is there any verse which says that throughout the Vedas the praise of Shiva is sung?
- How to change opamp variable resistor to fixed resistor?
- Shared-Memory Queue Implementation in C