@@ -22,34 +22,34 @@ const RESET = "\x1b[0m";
2222const BOLD = "\x1b [1m" ;
2323
2424pub const OutputFormat = enum {
25- table , // Default: Unicode table
26- json , // JSON output
27- latex , // LaTeX table
28- csv , // CSV format
25+ table , // Default: Unicode table
26+ json , // JSON output
27+ latex , // LaTeX table
28+ csv , // CSV format
2929};
3030
3131pub const Category = enum {
3232 all ,
33- em , // Electromagnetic
34- strong , // Strong force
35- weak , // Weak force
36- cosmo , // Cosmology
37- ckm , // CKM matrix
38- pmns , // PMNS neutrino
39- masses , // Particle masses
40- nuclear , // Nuclear physics
41- quantum , // Quantum physics
33+ em , // Electromagnetic
34+ strong , // Strong force
35+ weak , // Weak force
36+ cosmo , // Cosmology
37+ ckm , // CKM matrix
38+ pmns , // PMNS neutrino
39+ masses , // Particle masses
40+ nuclear , // Nuclear physics
41+ quantum , // Quantum physics
4242 mathematical , // Mathematical constants
43- ratios , // Mass ratios
44- condensed , // Condensed matter
45- planck , // Planck units
43+ ratios , // Mass ratios
44+ condensed , // Condensed matter
45+ planck , // Planck units
4646 astrophysics , // Astrophysics
47- nuclear_magic ,// Nuclear magic numbers
47+ nuclear_magic , // Nuclear magic numbers
4848};
4949
5050pub const SortBy = enum {
51- error_pct , // Sort by error % (ascending)
52- name , // Sort by name
51+ error_pct , // Sort by error % (ascending)
52+ name , // Sort by name
5353 category , // Sort by category
5454};
5555
@@ -123,21 +123,21 @@ fn matchesCategory(constant: sacred_formula.SacredConstant, cat: Category) bool
123123 return switch (cat ) {
124124 .all = > true ,
125125 .em = > std .mem .eql (u8 , target_cat , "particle_physics" ) and
126- (std .mem .indexOf (u8 , constant .name , "alpha" ) != null or
126+ (std .mem .indexOf (u8 , constant .name , "alpha" ) != null or
127127 std .mem .indexOf (u8 , constant .name , "CHSH" ) != null ),
128128 .strong = > std .mem .eql (u8 , target_cat , "particle_physics" ) and
129- std .mem .indexOf (u8 , constant .symbol , "ALPHA_STRONG" ) != null ,
129+ std .mem .indexOf (u8 , constant .symbol , "ALPHA_STRONG" ) != null ,
130130 .weak = > std .mem .eql (u8 , target_cat , "particle_physics" ) and
131- (std .mem .indexOf (u8 , constant .name , "Weinberg" ) != null or
132- std .mem .indexOf (u8 , constant .name , "CKM" ) != null ),
131+ (std .mem .indexOf (u8 , constant .name , "Weinberg" ) != null or
132+ std .mem .indexOf (u8 , constant .name , "CKM" ) != null ),
133133 .cosmo = > std .mem .eql (u8 , target_cat , "cosmology" ),
134134 .ckm = > std .mem .eql (u8 , target_cat , "ckm" ),
135135 .pmns = > std .mem .eql (u8 , target_cat , "neutrino" ),
136136 .masses = > std .mem .eql (u8 , target_cat , "particle_physics" ) and
137- (std .mem .indexOf (u8 , constant .symbol , "MASS" ) != null or
137+ (std .mem .indexOf (u8 , constant .symbol , "MASS" ) != null or
138138 std .mem .indexOf (u8 , constant .symbol , "MASS" ) != null ),
139139 .nuclear = > std .mem .eql (u8 , target_cat , "nuclear" ) or
140- std .mem .eql (u8 , target_cat , "nuclear_magic" ),
140+ std .mem .eql (u8 , target_cat , "nuclear_magic" ),
141141 .quantum = > std .mem .eql (u8 , target_cat , "quantum" ),
142142 .mathematical = > std .mem .eql (u8 , target_cat , "mathematical" ),
143143 .ratios = > std .mem .eql (u8 , target_cat , "ratios" ),
@@ -233,14 +233,16 @@ fn displayTable(cat: Category, sort: SortBy) void {
233233
234234 // Print row
235235 std .debug .print ("{s}│{s} {s:>3}{s} │ {s:<9}{s} │ {s:<16}{s} │ {d:>8.6}{s} │ {d:>7.6}{s} │ {s}{d:>5.4}%{s} │{s}\n " , .{
236- GOLDEN , RESET ,
237- WHITE , idx + 1 , RESET ,
238- CYAN , name_display , RESET ,
239- WHITE , formula_str , RESET ,
240- c .computed , RESET ,
241- c .target , RESET ,
242- err_color , c .error_pct , RESET ,
243- GOLDEN , RESET ,
236+ GOLDEN , RESET ,
237+ WHITE , idx + 1 ,
238+ RESET , CYAN ,
239+ name_display , RESET ,
240+ WHITE , formula_str ,
241+ RESET , c .computed ,
242+ RESET , c .target ,
243+ RESET , err_color ,
244+ c .error_pct , RESET ,
245+ GOLDEN , RESET ,
244246 });
245247 }
246248
@@ -434,7 +436,7 @@ pub fn displayPellisComparison() void {
434436
435437 // Print header
436438 std .debug .print ("\n {s}┌──────────────────────────────────────────────────────────────────────────────┐{s}\n " , .{ GOLDEN , RESET });
437- std .debug .print ("{s}│{s} {s}PELLIS φ⁵ vs TRINITY φ² + φ⁻² = 3{s} {s}│{s}\n " , .{ GOLDEN , RESET , BOLD , GOLDEN , RESET , GOLDEN , RESET });
439+ std .debug .print ("{s}│{s} {s}PELLIS φ⁵ vs TRINITY φ² + φ⁻² = 3{s} {s}│{s}\n " , .{ GOLDEN , RESET , BOLD , GOLDEN , RESET , GOLDEN });
438440 std .debug .print ("{s}├─────────────┬──────────────────────────┬───────────────────────────────────────┤{s}\n " , .{ GOLDEN , RESET });
439441 std .debug .print ("{s}│{s} {s}Constant{s} │ {s}Pellis{s} │ {s}Trinity{s} {s}│{s}\n " , .{ GOLDEN , RESET , CYAN , RESET , CYAN , RESET , CYAN , RESET , GOLDEN , RESET });
440442 std .debug .print ("{s}├─────────────┼──────────────────────────┼───────────────────────────────────────┤{s}\n " , .{ GOLDEN , RESET });
@@ -451,11 +453,9 @@ pub fn displayPellisComparison() void {
451453 });
452454
453455 if (pellis_err < trinity_err ) {
454- std .debug .print ("{s}│{s} │ {s}err: {d:.8}% {s}🏆{s} │ {s}err: {d:.4}%{s} {s}│{s}\n " , .{
455- GOLDEN , RESET , WHITE , pellis_err , GREEN , RESET , WHITE , trinity_err , RESET , GOLDEN , RESET ,
456- });
456+ std .debug .print ("{s}│{s} │ {s}err: {d:.8}% {s}[TROPHY]{s} │ {s}err: {d:.4}%{s} {s}│{s}\n " , .{ GOLDEN , RESET , WHITE , pellis_err , GREEN , RESET , WHITE , trinity_err , RESET , GOLDEN , RESET });
457457 } else {
458- std .debug .print ("{s}│{s} │ {s}err: {d:.8}%{s} │ {s}err: {d:.4}% {s}🏆 {s} {s}│{s}\n " , .{
458+ std .debug .print ("{s}│{s} │ {s}err: {d:.8}%{s} │ {s}err: {d:.4}% {s}[TROPHY] {s} {s}│{s}\n " , .{
459459 GOLDEN , RESET , WHITE , pellis_err , RESET , WHITE , trinity_err , GREEN , RESET , GOLDEN , RESET ,
460460 });
461461 }
@@ -478,14 +478,14 @@ pub fn displayPellisComparison() void {
478478 std .debug .print ("{s}├─────────────┼──────────────────────────┼───────────────────────────────────────┤{s}\n " , .{ GOLDEN , RESET });
479479
480480 // Summary rows
481- std .debug .print ("{s}│{s} {s}Scope{s} │ {s}~4 constants{s} │ {s}142 formulas {s}🏆 {s} {s}│{s}\n " , .{
481+ std .debug .print ("{s}│{s} {s}Scope{s} │ {s}~4 constants{s} │ {s}142 formulas {s}[TROPHY] {s} {s}│{s}\n " , .{
482482 GOLDEN , RESET , CYAN , RESET , WHITE , RESET , WHITE , GREEN , RESET , GOLDEN , RESET ,
483483 });
484484 std .debug .print ("{s}│{s} {s}Building{s} │ {s}{{integers, φ}}{s} │ {s}{{3, φ, π, e, γ=φ⁻³}}{s} {s}│{s}\n " , .{
485485 GOLDEN , RESET , CYAN , RESET , WHITE , RESET , WHITE , RESET , GOLDEN , RESET ,
486486 });
487487 std .debug .print ("{s}│{s} {s}Style{s} │ {s}Polynomial{s} │ {s}Monomial{s} {s}│{s}\n " , .{
488- GOLDEN , RESET , CYAN , RESET , WHITE , RESET , GOLDEN , RESET ,
488+ GOLDEN , RESET , CYAN , RESET , WHITE , RESET , WHITE , RESET , GOLDEN , RESET ,
489489 });
490490
491491 std .debug .print ("{s}└─────────────┴──────────────────────────┴───────────────────────────────────────┘{s}\n\n " , .{ GOLDEN , RESET });
0 commit comments