I just did a:
paul@cezanne:~/projects/kicad$ grep "999" ./*/*.kicad_pro
And it turns out that at least 12 of my projects have these silly numbers in them.
Another grep shows mixed results for both “normal” and “silly” numbers for the same variable between different projects.
paul@cezanne:~/projects/kicad$ grep "min_via_diameter" ./*/*.kicad_pro
./00aa_lib/00aa_lib.kicad_pro: "min_via_diameter": 0.5,
./00aa_module.pretty/00aa_module.pretty.kicad_pro: "min_via_diameter": 0.5,
./7-Segment/7-segment.kicad_pro: "min_via_diameter": 0.4,
./beyerdynamic_A1_clone_kit/beyerdynamic_a1_clone_kit.kicad_pro: "min_via_diameter": 0.5,
./breakout_soic8/breakout_soic8.kicad_pro: "min_via_diameter": 0.39999999999999997,
./display_8x8_595_002.kicad_pro/display_8x8_595_002.kicad_pro.kicad_pro: "min_via_diameter": 0.4,
./display_8x8_595_003/display_8x8_595_003.kicad_pro: "min_via_diameter": 0.4,
./display_8x8_595/display_8x8_595.kicad_pro: "min_via_diameter": 0.4,
./integrator/integrator.kicad_pro: "min_via_diameter": 0.5,
./kelvin_varley/kelvin_varley.kicad_pro: "min_via_diameter": 0.4,
./LED_PT4115/LED_PT4115.kicad_pro: "min_via_diameter": 0.4,
./Load_Programmable_Resistors/Load_Programmable_Resistors.kicad_pro: "min_via_diameter": 0.39999999999999997,
./Motor_Controller/Motor_Controller.kicad_pro: "min_via_diameter": 0.39999999999999997,
./motor_stspin32f0/motor_stspin32f0.kicad_pro: "min_via_diameter": 0.39999999999999997,
./Motor_TO252/Motor_TO252.kicad_pro: "min_via_diameter": 0.39999999999999997,
./Motor_ZZQ161121/Motor_ZZQ161121.kicad_pro: "min_via_diameter": 0.5,
./opamp_offset/opamp_offset.kicad_pro: "min_via_diameter": 0.39999999999999997,
./Power_smps_HV/Power_smps_HV.kicad_pro: "min_via_diameter": 0.39999999999999997,
./scara_slipring_encoder/scara_slipring_encoder.kicad_pro: "min_via_diameter": 0.39999999999999997,
There are also 8 projects with “silly numbers” in this setting, so silly numbers change location depending on moon phases or whatever. From the number of lines. about half the projects do not have the “min_via_diameter” variable at all in it’s project file.
It’s both weird / unexpected and seemingly harmless. I don’t know whether this would be worth reporting or fixing. KiCad developers already have many bugs, feature requests and ideas to divide their attention over then they have time to implement them. On the other side of the equation, there could be some bugs lingering here and I’d like to see a “robust” implementation.
In the mean time, when working with floating point numbers, you should never ever compare for equalness, but always compare against some range. (Bigger or smaller then some limit, from X to Y, etc).