Maybe it’s a OS-specific thing. I traced it down to a single variable which is current_number_of_binary_digits_per_value.
On this block: $length,1,1,{1+$act_arr_sortclass}
: Add this line of code.
if(x==128,print(current_number_of_binary_digits_per_value));
My results:
C:\Windows\System32>gmic +new_rep_lavander_binary_map 8,0
[gmic]./ Start G'MIC interpreter (v.3.3.6).
[gmic_math_parser] current_number_of_binary_digits_per_value = (uninitialized) (mem[45]: scalar)
[gmic_math_parser] current_number_of_binary_digits_per_value = 8
[gmic_math_parser] current_number_of_binary_digits_per_value = 8
4::MSB1aW50OCBsaXR0bGVfZW5kaWFuCjI1NiAxIDEgMiAjODIKeJydTkkOACEIg9b/v3mmYg96IFET04WyRPwv9TONCfFdJwD7XV0Iiu/5135rkLTfzb/eH4vOUKGip64jyu/qQp165l/7rclB+9382/0fpZ4DAg==
[gmic]./ Display image [0] = '[begin( const shift_factor=$s...'.
[0] = '[begin( const shift_factor=$shift; const mode=$mode; const bi...':
size = (256,256,1,1) [256 Kio of float32].
data = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ... ,1,1,1,2,2,2,2,3,3,3,2,2,2,3,1,1,1,2,2,2,1,2,2,2,2,2,2,3,3,3,2,2,2,3,2,1,1,1,2,2,2,2,3,3,3,2,2,2,3,2,1,1,1,2,3,3,3,2,1,1,1,2,3,3).
min = 0, max = 4, mean = 1.3125, std = 0.802833, coords_min = (0,0,0,0), coords_max = (251,35,0,0).
[gmic]./ End G'MIC interpreter.
C:\Windows\System32>gmic +new_rep_lavander_binary_map 8,0
[gmic]./ Start G'MIC interpreter (v.3.3.6).
[gmic_math_parser] current_number_of_binary_digits_per_value = (uninitialized) (mem[45]: scalar)
[gmic_math_parser] current_number_of_binary_digits_per_value = 1
[gmic_math_parser] current_number_of_binary_digits_per_value = 1
0::MSB1aW50OCBsaXR0bGVfZW5kaWFuCjI1NiAxIDEgMiAjMTQKeJxjYBgFIxkAAAIAAAE=
[gmic]./ Display image [0] = '[begin( const shift_factor=$s...'.
[0] = '[begin( const shift_factor=$shift; const mode=$mode; const bi...':
size = (256,256,1,1) [256 Kio of float32].
data = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ... ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0).
min = 0, max = 0, mean = 0, std = 0, coords_min = (0,0,0,0), coords_max = (0,0,0,0).
@David_Tschumperle Any explanations on this perplexing bug? It’s perplexing because:
current_value=x;
current_number_of_binary_digits_per_value=(i?int(log2(current_value)))+1;
When x is 128, it should be 8. Not 1. So, there should be no reason why I get a 1 here randomly. It is usually 8 though. With multiple computers, this bug does show up on Windows. That’s for certain.