@@ -67,35 +67,35 @@ to `A[ceil(Int,x)]` without scaling.
6767Constant
6868
6969function positions (c:: Constant{Previous} , ax, x) # discontinuity occurs at integer locations
70- x_value = ForwardDiff . value (ForwardDiff . value (x) )
70+ x_value = just_dual_value .(x )
7171 xm = floorbounds (x_value, ax)
7272 δx = x - xm
7373 fast_trunc (Int, xm), δx
7474end
7575function positions (c:: Constant{Next} , ax, x) # discontinuity occurs at integer locations
76- x_value = ForwardDiff . value (ForwardDiff . value (x) )
76+ x_value = just_dual_value .(x )
7777 xm = ceilbounds (x_value, ax)
7878 δx = x - xm
7979 fast_trunc (Int, xm), δx
8080end
8181function positions (c:: Constant{Nearest} , ax, x) # discontinuity occurs at half-integer locations
82- x_value = ForwardDiff . value (ForwardDiff . value (x) )
82+ x_value = just_dual_value .(x )
8383 xm = roundbounds (x_value, ax)
8484 δx = x - xm
8585 i = fast_trunc (Int, xm)
8686 i, δx
8787end
8888
8989function positions (c:: Constant{Previous,Periodic{OnCell}} , ax, x)
90- x_value = ForwardDiff . value (ForwardDiff . value (x) )
90+ x_value = just_dual_value .(x )
9191 # We do not use floorbounds because we do not want to add a half at
9292 # the lowerbound to round up.
9393 xm = floor (x_value)
9494 δx = x - xm
9595 modrange (fast_trunc (Int, xm), ax), δx
9696end
9797function positions (c:: Constant{Next,Periodic{OnCell}} , ax, x) # discontinuity occurs at integer locations
98- x_value = ForwardDiff . value (ForwardDiff . value (x) )
98+ x_value = just_dual_value .(x )
9999 xm = ceilbounds (x_value, ax)
100100 δx = x - xm
101101 modrange (fast_trunc (Int, xm), ax), δx
0 commit comments