1 #directory "/Users/thomashales/Desktop/googlecode/flyspeck/glpk";;
9 let rec binary_rec f a b eps =
11 if abs_float (fa) < eps then a
13 let c = (a +. b) /. 2. in
15 (if (fa *. fc <= 0.0) then binary_rec f a c eps
16 else binary_rec f c b eps);;
18 let binary f a b eps =
19 let _ = (a < b) or failwith "a b inversion" in
20 let _ = f a *. f b <= 0.0 or failwith "same sign" in
21 binary_rec f a b eps;;
23 let length_of_arc theta =
24 binary (fun x -> arc 2. 2. x -. theta) 2.0 4.0 (10.0** -8.0);;
26 let tame_table_d r s =
27 if (r + 2 * s <= 3) then 0.0
29 let r' = float_of_int r in
30 let s' = float_of_int s in
31 0.103 *. (2.0 -. s') +. 0.2759 *. (r' +. 2.0 *. s' -. 4.0);;
36 15.53 is the upper bound on the deforming edge.
37 Let's check that two adjacent standard edges fit within this bound.
38 Conclusion, whenever there is a pair of adjacent standard edges, they
39 are extremal 2 or 2.52; EXCEPT in something that starts out a hexagon
40 or protracted pent with two adjacent flats.
43 let check_206A1_constant =
44 let u = 2.0 *. arc 2. 2. 2.52 in
45 let m = length_of_arc u in
47 (m2 < 15.53);; (* 15.319 *)
49 let check_206A1_protracted51 =
50 let u = arc 2. 2. 2.52 +. arc 2. 2. sqrt8 in
51 let m = length_of_arc u in
54 (m2 < 15.53);; (* 15.319 *)
56 let factoid1 = (* generic fans except for hexagons *)
57 let u = arc 2. 2. cstab +. arc 2. 2. 2.52 in
58 u < pi;; (* u = 3.0668... *)
60 let two_flats_arc_min = 2.0 *. arc 2.52 2. 2. +. arc 2. 2. 2.;;
64 Pervasives.cos 1.364;;
66 arc 2. 2. 2. +. arc 2. 2. 2. +. arc 2.52 2. 2.;;