#Why isn't Julia's implementation of `isapprox()` type-unstable?

1 messages · Page 1 of 1 (latest)

balmy basalt
#

It has two keyword arguments typed as Real, and one typed as Function. These are abstract types, and from my understanding keyword parameters do not participate in type deduction or dynamic compilation. So shouldn't this be type-unstable?

Yet when I check out @code_typed, that doesn't seem to be the case, and @time doesn't show any allocations from calling it.

vestal hound
#

You should try @code_warntype to check for type unstable @balmy basalt

warped ocean
#

could you give an example of what you were trying to run? the single test I ran was typed

raven kestrel
#

I think number types are automatically fully deduced

#

or isbits types more specifically