#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main(){
    int x1,y1,x2,y2;
    scanf("%d %d",&x1,&y1);
    scanf("%d %d",&x2,&y2);
    double dE;
    dE=sqrt(pow(x1-x2,2)+pow(y1-y2,2));
    int dM;
    dM=(abs(x1-x2)+abs(y1-y2));
    double distance;
    distance=fabs(dM-dE);
    printf ("%.18lf",distance);
    return 0;
}

stdlib.h里面的abs

math.h里面的fabs

浮点数的