testlist <- list(indices = c(-2002150402L, 235453290L, 1697575087L, -1489736391L, 1747968813L, 924979439L, -1052514815L, -774707878L, 2072074377L, -1995181074L, 1122279145L, 1083108324L, 990293618L, 683565802L, 38333395L, NA, 1384456155L, -1726756389L, -144194545L, 1944555694L, -314695659L, -41746433L, -873737499L, -1140819186L, -2053379810L, -1364002395L, 448705677L, -1522189422L, -2091145344L, -559448151L, -1840083378L, 1376410839L), min_seg = -1006092317L, w = c(1.89933808332613e-203, -13522.9652966742, 1.99423108417317e+59, -4.22823588292551e-141, -3.0262970660233e-205, 4.37862435701691e-97, -Inf, -1.04657360755238e+257, -1.50254272257813e-28, NA, 5.63130458104065e+72, 4.43504309475666e+94, -1.19551628975984e+134, -2.50974474569959e+90, -1.04652532744444e-255, 3.34593152386368e-20, 1.2914735792314e-90, -1.81180275038578e+270, 6.77414609585808e+198, -1.33855403729888e+68, 1.215457633607e-170, 3.34554899557527e-149, 8.99936091127538e-270, -1.25691282152735e-239, -Inf, 2.34567403130399e+82, 63606.8720683278, Inf, 1.29870018028966e+160, 6.99891267634272e-287, -4.11110683495664e-105, -3.03895924256635e+60, -5.2802430647279e-306, 1.35140005317011e+58, 2.06098668955461e+255, -3900307930196.08, 1.58442632920936e-111, -1.1042626424594e-208, NA, 1.71825188005921e-67, -2.03489112519222e+55, -4.42653468212844e+46, -7.68300251566332e-49, 0), y = c(-3.62212305595006e+28, 1.75649553477153e-153, -Inf, -2.75181344745296e-68, -Inf, -Inf, 3.46292392617766e-85, -6.02206730306479e-108, -2.43067609406499e+78, -7.4591946379998e+204, -7.4923132686576e-259, 0)) result <- do.call(RcppDynProg::const_costs_logistic,testlist) str(result)