The only difference is “40.8559314” versus “40.86”

mgibbs189

{{gist file=”trig.sql” lang=”sql”}}
/* returns NULL */
SELECT ( 3959 * acos( cos( radians( 40.8559314 ) ) * cos( radians( 40.8559314 ) ) * cos( radians( -73.2006687 ) – radians( -73.2006687 ) ) + sin( radians( 40.8559314 ) ) * sin( radians( 40.8559314 ) ) ) ) AS distance;

/* returns 0 */
SELECT ( 3959 * acos( cos( radians( 40.86 ) ) * cos( radians( 40.86 ) ) * cos( radians( -73.2006687 ) – radians( -73.2006687 ) ) + sin( radians( 40.86 ) ) * sin( radians( 40.86 ) ) ) ) AS distance;

{{/gist}}