- let num_positive =
- if num_init >= 0 then num_init
- else (-num_init) in
- let denom_positive =
- if denom_init > 0 then denom_init
- else if denom_init < 0 then -denom_init
- else raise (Signal_operation "sample rate denominater = 0.") in
- let factor = pgcd num_positive denom_positive in
- let num_corrected = num_init / factor in
- let denom_corrected = denom_init / factor in