KazzLabs


Pythagoras
Pythagorean theorem in practice

Definitions of variables in the right triangleScreen of the calculation program

5. Software download

You can perform calculations on your local computer without any data or calculation limits using the kazzlabs_ptg program.

It is a Windows console program, but can also be run on Linux console using Wine.

Usage:

kazzlabs_ptg a_min a_max b_min b_max delta_abc -ofilename [-aalpha:deltaalpha] [-fcomma] [-ftab] [-h] [-dc] [-D1]

Parameters:
a_min, a_max, b_min, b_max: range of triangle side lengths from 1 to 2000000000
delta_abc: maximal error of triangle side lengths in range 0,000001 to 1
-ofilename: output filename
optional -aalpha:deltaalpha: alpha angle (10.0 to 80.0) and maximal error of angle (0,00001 to 1,0) in degrees
optional -dc: print delta c
optional -D1: include D1 values
optional -ftab: tab separated values (default is comma separated)
optional -h: print header

example: kazzlabs_ptg 1 200 1 200 0.01 -oresult.txt
example: kazzlabs_ptg 1 200 1 200 0.01 -a45.5:0.1 -oresult.txt -dc -D1 -ftab -h


Sample output:

kazzlabs_ptg64.exe 1 10000 1 1000 0.001 -a38.0:0.01 -oOutput.txt -dc -D1 -h
kazzlabs_ptg: min_a=1, max_a=10000, min_b=1, max_b=1000, Err=0.001000, alpha=38.00000 alpha_err=0.01000, Comma, delta_c, D1, output:'Output.txt'

10000000 Calculations, 2 Results


Sample output file:

a,b,c,delta_c,alpha,90°,d_alpha,d90°,D1(max_dalpha),D1(max_d90°),Exact
639,818,1038,0.00048170,37.99603462,89.99994519,0.00402197,0.00019155,14246,299115,0
642,822,1043,0.00047939,37.99059518,90.00005429,0.00946113,0.00019038,6056,300955,0

The 'Exact' column informs if the numbers follow the Pythagorean theorem (1) or only approximate (0).
You can open the tab separated file in any text editor, select all, copy and paste into any worksheet application. The data will fit the grid.

Download 32-bit version: kazzlabs_ptg.exe v.1.0.1

Download 64-bit version: kazzlabs_ptg64.exe v.1.0.1

The 32-bit version works well with 32-bit Wine in Linux environment.
Both versions are native C++ applications, the file size is only 14KiB, works on Windows XP/Vista/7/8/8.1/10/11.

© Kazimierz Pomierny 2025-09-16