compare two fields and get a third field

Hello,

I'm trying to get a value based on a comparison of two fields, this is:

file1

687.45
687.18
687.322
687.405
686.865

file 2

685    6.43 
686    6.43 
687    6.42 
688    6.42

I'm using this code that works well for rounded values:

awk -F " " 'BEGIN{while(getline<"file1") a [$1]=1 } ; a [$1] == 1 { print $2 }' file2

because my file1 has decimals, I dont know how to adapt the awk line above to round decimals in file1.

Any suggestion and help on this are very welcome, thanks in advance.

awk -F " " 'BEGIN{while(getline<"file1"){b=int($1+0.5);a=1}} ; a [$1] == 1 { print $2 }' file2
awk 'NR==FNR{a[int($1+0.5)];next} $1 in a {print $2}' file1 file2

Thanks for your answers, I'm a bit confused about the output, let me put an example please:

I have the two-columns file, from where I need to extract the info stored in the second column based on the other file (explained afterhere). The 2-columns has 3438 records:

fileA

1 23.69
2 23.64
3 23.63
4 23.69
5 23.64
6 23.63
7 23.61
8 23.49
9 23.32
10 23.06
...
...
3452 1.78
3453 1.78
3454 1.78
3455 1.78
3456 1.78
3457 1.78
3458 1.78
3459 1.78
3460 1.78
3461 1.78
3462 1.78
3463 1.78
3464 1.78
3465 1.78
3466 1.78
3467 1.78
3468 1.78
3469 1.78
3470 1.78

the other file, one-column file, has 15287 records:

fileB

3462.91
3456.48
3456.48
3456.48
3452.03
3452.03
3447.48
3447.48
3443.03
3443.03
3443.03
3438.63
3438.63
3434.08
3434.08
3434.08
3431.35
...
...
687.705
687.607
687.263
687.518
687.45
687.18
687.322
687.405
686.865

basically, the fileB should match the first column of fileA and then output the second column of fileA. But here is the part I don't know how to do it, it should be row-by-row, or in order based on fileB, so for instance, at the end I would get something like:

1.78
1.78
1.78
1.78
1.78
...

thinking on the first part of fileB for instance, from 3462.91 to 3452.03 (in red above). I think on this like a row-by-row scanning. So at the end, I should have an output with 15287 records like fileB.

Again, thanks for your nice support.