split Subroutine

private pure subroutine split(a, h, l)

Veltkamp's split of a double into two halves of 26 bits: .

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: a
real(kind=dp), intent(out) :: h
real(kind=dp), intent(out) :: l

Called by

proc~~split~~CalledByGraph proc~split split proc~two_prod two_prod proc~two_prod->proc~split proc~scaled scaled proc~scaled->proc~two_prod proc~add_real text_buffer%add_real proc~add_real->proc~scaled proc~add_real_list text_buffer%add_real_list proc~add_real_list->proc~add_real proc~add_real_array text_buffer%add_real_array proc~add_real_array->proc~add_real_list proc~write_json_real_array write_json_real_array proc~write_json_real_array->proc~add_real_list proc~generate_eclipse_data mission_type%generate_eclipse_data proc~generate_eclipse_data->proc~write_json_real_array proc~segment_trajectory_json segment_trajectory_json proc~segment_trajectory_json->proc~add_real_array proc~export_trajectory_json_file mission_type%export_trajectory_json_file proc~export_trajectory_json_file->proc~segment_trajectory_json proc~halo_solver_main halo_solver_main proc~halo_solver_main->proc~generate_eclipse_data proc~halo_solver_main->proc~export_trajectory_json_file

Source Code

    pure subroutine split(a, h, l)

    real(dp),intent(in) :: a
    real(dp),intent(out) :: h, l

    real(dp),parameter :: factor = 134217729.0_dp  !! 2^27 + 1
    real(dp) :: c

    c = factor * a
    h = c - (c - a)
    l = a - h

    end subroutine split