FUNCTION FindValue(reihe:byte; wert:integer):integer;
const
//r3:array[0..2] of double=(1.0,2.2,4.7); //2^0
//r6:array[0..5] of double=(1.0,1.5,2.2,3.3,4.7,6.8);//2^1
//r12:array[0..11] of double=(1.0,1.2,1.5,1.8,2.2,2.7,3.3,3.9,4.7,5.6,6.8,8.2); //2^2
r24:array[0..23] of integer=(100,110,120,130,150,160,180,200,220,240,270,300,330,360,390,430,470,510,560,620,680,750,820,910);//schrittweite 8 (1,9,...) =>E3 2^3
r192:array[0..191] of double=(
100,101,102,104,105,106,107,109,110,111,113,114,115,117,118,120,121,123,124,126,127,129,130,132,133,135,137,138,140,142,143,145,147,149,
150,152,154,156,158,160,162,164,165,167,169,172,174,176,178,180,182,184,187,189,191,193,196,198,
200,203,205,208,210,213,215,218,221,223,226,229,232,234,237,240,243,246,249,
252,255,258,261,264,267,271,274,277,280,284,287,291,294,298,
301,305,309,312,316,320,324,328,332,336,340,344,348,
352,357,361,365,370,374,379,383,388,392,397,
402,407,412,417,422,427,432,437,442,448,
453,459,464,470,475,481,487,493,499,
505,511,517,523,530,536,542,549,
556,562,569,576,583,590,597,
604,612,619,626,634,642,649,
657,665,673,681,690,698,
706,715,723,732,741,
750,759,768,777,787,796,
806,816,825,835,845,
856,866,876,887,898,
909,920,931,942,
953,965,976,988
);
var first,last,actual,step:integer;
found:boolean;
begin
first:=0;
last:=(3 shl reihe)-1;
step:=1 shl (7-(reihe+4));
found:=false;
actual:=-1;
while not found and (first<=last) do
begin
actual:=(first+last) shr 1;
if r24[actual*step]<wert then
first:=actual+1
else
last:=actual-1;
end;
if first>((3 shl reihe)-1) then
result:=r24[0]*10
else
result:=r24[actual*step];
end;