@@ -248,7 +248,7 @@ function checks(f, α, start_point, end_point)
248248 end
249249end
250250
251- function fracint (f:: FunctionAndNumber , α, start_point, end_point:: Real , h:: Float64 , :: RLDirect )
251+ function fracint (f:: FunctionAndNumber , α, start_point, end_point:: Real , h:: Real , :: RLDirect )
252252 # checks(f, α, start_point, end_point)
253253 typeof (f) <: Number ? (end_point == 0 ? (return 0 ) : (return 2 * f* sqrt (end_point/ pi ))) : nothing
254254 end_point == 0 ? (return 0 ) : nothing
@@ -261,13 +261,13 @@ function fracint(f::FunctionAndNumber, α, start_point, end_point::Real, h::Floa
261261 return result
262262end
263263
264- function fracint (f:: FunctionAndNumber , α:: Float64 , end_point, h:: Float64 , :: RLPiecewise ):: Float64
264+ function fracint (f:: FunctionAndNumber , α:: Real , end_point, h:: Real , :: RLPiecewise ):: Real
265265 # checks(f, α, 0, end_point)
266266 typeof (f) <: Number ? (end_point == 0 ? (return 0 ) : (return 2 * f* sqrt (end_point/ pi ))) : nothing
267267 end_point == 0 ? (return 0 ) : nothing
268268 # Initialize
269269 n = round (Int, end_point/ h)
270- result = zero (Float64 )
270+ result = zero (Real )
271271
272272 @fastmath @inbounds @simd for i ∈ 0 : n
273273 result += W (i, n, α)* f (i* h)
@@ -287,19 +287,19 @@ function W(i, n, α)
287287end
288288
289289
290- function fracint (f:: Union{Number, Function} , α:: Float64 , end_point:: AbstractArray , h:: Float64 , :: RLPiecewise ):: Vector
290+ function fracint (f:: Union{Number, Function} , α:: Real , end_point:: AbstractArray , h:: Real , :: RLPiecewise ):: Vector
291291 result = map (x-> fracint (f, α, x, h, RLPiecewise ()), end_point)
292292 return result
293293end
294294
295295
296- function fracint (f:: FunctionAndNumber , α:: Float64 , end_point, h:: Float64 , :: RLIntApprox ):: Float64
296+ function fracint (f:: FunctionAndNumber , α:: Real , end_point, h:: Real , :: RLIntApprox ):: Real
297297 # checks(f, α, 0, end_point)
298298 typeof (f) <: Number ? (end_point == 0 ? (return 0 ) : (return 2 * f* sqrt (end_point/ pi ))) : nothing
299299 end_point == 0 ? (return 0 ) : nothing
300300 α = - α
301301 n = round (Int, end_point/ h)
302- result = zero (Float64 )
302+ result = zero (Real )
303303
304304 @fastmath @inbounds @simd for i ∈ 0 : n- 1
305305 result += (f (end_point- i* h) + f (end_point- (i+ 1 )* h))* ((i+ 1 )^ (- α) - i^ (- α))
@@ -309,21 +309,21 @@ function fracint(f::FunctionAndNumber, α::Float64, end_point, h::Float64, ::RLI
309309 return result1
310310end
311311
312- function fracint (f:: Union{Number, Function} , α:: Float64 , end_point:: AbstractArray , h:: Float64 , :: RLIntApprox ):: Vector
312+ function fracint (f:: Union{Number, Function} , α:: Real , end_point:: AbstractArray , h:: Real , :: RLIntApprox ):: Vector
313313 result = map (x-> fracint (f, α, x, h, RLIntApprox ()), end_point)
314314 return result
315315end
316316
317317
318318
319319
320- function fracint (f:: FunctionAndNumber , α:: Float64 , end_point:: Number , h:: Float64 , :: RLLinearInterp ):: Float64
320+ function fracint (f:: FunctionAndNumber , α:: Real , end_point:: Number , h:: Real , :: RLLinearInterp ):: Real
321321 typeof (f) <: Number ? (end_point == 0 ? (return 0 ) : (return 2 * f* sqrt (end_point/ pi ))) : nothing
322322 end_point == 0 ? (return 0 ) : nothing
323323
324324 α = - α
325325 n = round (Int, end_point/ h)
326- result = zero (Float64 )
326+ result = zero (Real )
327327
328328 @fastmath @inbounds @simd for i ∈ 0 : n- 1
329329 result += ((i+ 1 )* f (end_point- i* h)- i* f (end_point- (i+ 1 )* h))/ (- α)* ((i+ 1 )^ (- α) - i^ (- α))+ (f (end_point - (i+ 1 )* h) - f (end_point- i* h))/ (1 - α)* ((i+ 1 )^ (1 - α) - i^ (1 - α))
@@ -333,14 +333,14 @@ function fracint(f::FunctionAndNumber, α::Float64, end_point::Number, h::Float6
333333 return result1
334334end
335335
336- function fracint (f:: Union{Number, Function} , α:: Float64 , end_point:: AbstractArray , h:: Float64 , :: RLLinearInterp ):: Vector
336+ function fracint (f:: Union{Number, Function} , α:: Real , end_point:: AbstractArray , h:: Real , :: RLLinearInterp ):: Vector
337337 result = map (x-> fracint (f, α, x, h, RLLinearInterp ()), end_point)
338338 return result
339339end
340340
341341
342342
343- function fracint (f, α:: Number , end_point, h:: Float64 , :: RLIntMatrix )
343+ function fracint (f, α:: Number , end_point, h:: Real , :: RLIntMatrix )
344344 N = round (Int, end_point/ h+ 1 )
345345 tspan = collect (0 : h: end_point)
346346 return J (N, α, h)* f .(tspan)
@@ -356,7 +356,7 @@ function omega(n, p)
356356 return omega
357357end
358358
359- function J (N, p, h:: Float64 )
359+ function J (N, p, h:: Real )
360360 result = zeros (N, N)
361361 temp = omega (N, - p)
362362
371371#=
372372RLIntSimpson Algorithm
373373=#
374- function fracint (f, α, point, h:: Float64 , :: RLIntSimpson )
374+ function fracint (f, α, point, h:: Real , :: RLIntSimpson )
375375 typeof (f) <: Number ? (point == 0 ? (return 0 ) : (return 2 * f* sqrt (point/ pi ))) : nothing
376376 point == 0 ? (return 0 ) : nothing
377377
@@ -403,20 +403,20 @@ function ĉₖₙ(k, n, α)
403403 return ((α+ 2 )* ((n+ 1 - k)^ (1 + α)+ (n- k)^ (1 + α))- 2 * ((n+ 1 - k)^ (2 + α)- (n- k)^ (2 + α)))
404404end
405405
406- function fracint (f:: Union{Number, Function} , α:: Float64 , end_point:: AbstractArray , h:: Float64 , :: RLIntSimpson ):: Vector
406+ function fracint (f:: Union{Number, Function} , α:: Real , end_point:: AbstractArray , h:: Real , :: RLIntSimpson ):: Vector
407407 result = map (x-> fracint (f, α, x, h, RLIntSimpson ()), end_point)
408408 return result
409409end
410410
411411#=
412412RLIntTrapezoidal Algorithm
413413=#
414- function fracint (f:: FunctionAndNumber , α, point, h:: Float64 , :: RLIntTrapezoidal )
414+ function fracint (f:: FunctionAndNumber , α, point, h:: Real , :: RLIntTrapezoidal )
415415 typeof (f) <: Number ? (point == 0 ? (return 0 ) : (return 2 * f* sqrt (point/ pi ))) : nothing
416416 point == 0 ? (return 0 ) : nothing
417417
418418 N = round (Int, point/ h)
419- result = zero (Float64 )
419+ result = zero (Real )
420420
421421 @fastmath @inbounds @simd for i ∈ 0 : N
422422 result += aₖₙ (i, N, α)* f (i* h)
@@ -436,12 +436,12 @@ function aₖₙ(k, n, α)
436436end
437437
438438
439- function fracint (f:: Union{Number, Function} , α, point, h:: Float64 , :: RLIntRectangular )
439+ function fracint (f:: Union{Number, Function} , α, point, h:: Real , :: RLIntRectangular )
440440 typeof (f) <: Number ? (point == 0 ? (return 0 ) : (return 2 * f* sqrt (point/ pi ))) : nothing
441441 point == 0 ? (return 0 ) : nothing
442442
443443 N = round (Int, point/ h)
444- result = zero (Float64 )
444+ result = zero (Real )
445445
446446 @fastmath @inbounds @simd for i ∈ 0 : N- 1
447447 result += bₖ (N- i- 1 , α)* f (i* h)
@@ -454,20 +454,20 @@ function bₖ(k, α)
454454 return (k+ 1 )^ α- k^ α
455455end
456456
457- function fracint (f:: Union{Number, Function} , α:: Float64 , end_point:: AbstractArray , h:: Float64 , :: RLIntRectangular ):: Vector
457+ function fracint (f:: Union{Number, Function} , α:: Real , end_point:: AbstractArray , h:: Real , :: RLIntRectangular ):: Vector
458458 result = map (x-> fracint (f, α, x, h, RLIntRectangular ()), end_point)
459459 return result
460460end
461461
462462#=
463463RLIntCubicSplineInterp Algorithm, when h is 0.01 behave best
464464=#
465- function fracint (f, α, point, h:: Float64 , :: RLIntCubicSplineInterp )
465+ function fracint (f, α, point, h:: Real , :: RLIntCubicSplineInterp )
466466 typeof (f) <: Number ? (point == 0 ? (return 0 ) : (return 2 * f* sqrt (point/ pi ))) : nothing
467467 point == 0 ? (return 0 ) : nothing
468468
469469 N = round (Int, point/ h)
470- result = zero (Float64 )
470+ result = zero (Real )
471471
472472 @fastmath @inbounds @simd for j ∈ 0 : N
473473 result += eⱼₙ (j, N, α)* f (j* h) + h* êⱼₙ (j, N, α)* first_order (f, j* h, h)
@@ -495,7 +495,7 @@ function êⱼₙ(j, n, α)
495495 end
496496end
497497
498- function fracint (f:: Union{Number, Function} , α:: Float64 , end_point:: AbstractArray , h:: Float64 , :: RLIntCubicSplineInterp ):: Vector
498+ function fracint (f:: Union{Number, Function} , α:: Real , end_point:: AbstractArray , h:: Real , :: RLIntCubicSplineInterp ):: Vector
499499 result = map (x-> fracint (f, α, x, h, RLIntCubicSplineInterp ()), end_point)
500500 return result
501501end
0 commit comments