@@ -193,12 +193,12 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
193193 => {
194194 let [ f] = check_arg_count ( args) ?;
195195 let f = this. read_scalar ( f) ?. to_f32 ( ) ?;
196- // FIXME: Using host floats.
196+ // Using host floats (but it's fine, these operations do not have guaranteed precision) .
197197 let f_host = f. to_host ( ) ;
198198 let res = match intrinsic_name {
199199 "sinf32" => f_host. sin ( ) ,
200200 "cosf32" => f_host. cos ( ) ,
201- "sqrtf32" => f_host. sqrt ( ) ,
201+ "sqrtf32" => f_host. sqrt ( ) , // FIXME Using host floats, this should use full-precision soft-floats
202202 "expf32" => f_host. exp ( ) ,
203203 "exp2f32" => f_host. exp2 ( ) ,
204204 "logf32" => f_host. ln ( ) ,
@@ -238,12 +238,12 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
238238 => {
239239 let [ f] = check_arg_count ( args) ?;
240240 let f = this. read_scalar ( f) ?. to_f64 ( ) ?;
241- // FIXME: Using host floats.
241+ // Using host floats (but it's fine, these operations do not have guaranteed precision) .
242242 let f_host = f. to_host ( ) ;
243243 let res = match intrinsic_name {
244244 "sinf64" => f_host. sin ( ) ,
245245 "cosf64" => f_host. cos ( ) ,
246- "sqrtf64" => f_host. sqrt ( ) ,
246+ "sqrtf64" => f_host. sqrt ( ) , // FIXME Using host floats, this should use full-precision soft-floats
247247 "expf64" => f_host. exp ( ) ,
248248 "exp2f64" => f_host. exp2 ( ) ,
249249 "logf64" => f_host. ln ( ) ,
@@ -366,7 +366,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
366366 let [ f1, f2] = check_arg_count ( args) ?;
367367 let f1 = this. read_scalar ( f1) ?. to_f32 ( ) ?;
368368 let f2 = this. read_scalar ( f2) ?. to_f32 ( ) ?;
369- // FIXME: Using host floats.
369+ // Using host floats (but it's fine, this operation does not have guaranteed precision) .
370370 let res = f1. to_host ( ) . powf ( f2. to_host ( ) ) . to_soft ( ) ;
371371 let res = this. adjust_nan ( res, & [ f1, f2] ) ;
372372 this. write_scalar ( res, dest) ?;
@@ -376,7 +376,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
376376 let [ f1, f2] = check_arg_count ( args) ?;
377377 let f1 = this. read_scalar ( f1) ?. to_f64 ( ) ?;
378378 let f2 = this. read_scalar ( f2) ?. to_f64 ( ) ?;
379- // FIXME: Using host floats.
379+ // Using host floats (but it's fine, this operation does not have guaranteed precision) .
380380 let res = f1. to_host ( ) . powf ( f2. to_host ( ) ) . to_soft ( ) ;
381381 let res = this. adjust_nan ( res, & [ f1, f2] ) ;
382382 this. write_scalar ( res, dest) ?;
@@ -386,7 +386,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
386386 let [ f, i] = check_arg_count ( args) ?;
387387 let f = this. read_scalar ( f) ?. to_f32 ( ) ?;
388388 let i = this. read_scalar ( i) ?. to_i32 ( ) ?;
389- // FIXME: Using host floats.
389+ // Using host floats (but it's fine, this operation does not have guaranteed precision) .
390390 let res = f. to_host ( ) . powi ( i) . to_soft ( ) ;
391391 let res = this. adjust_nan ( res, & [ f] ) ;
392392 this. write_scalar ( res, dest) ?;
@@ -396,7 +396,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
396396 let [ f, i] = check_arg_count ( args) ?;
397397 let f = this. read_scalar ( f) ?. to_f64 ( ) ?;
398398 let i = this. read_scalar ( i) ?. to_i32 ( ) ?;
399- // FIXME: Using host floats.
399+ // Using host floats (but it's fine, this operation does not have guaranteed precision) .
400400 let res = f. to_host ( ) . powi ( i) . to_soft ( ) ;
401401 let res = this. adjust_nan ( res, & [ f] ) ;
402402 this. write_scalar ( res, dest) ?;
0 commit comments